[x86-64] Alias don't seam to override previous ones
The pytest test_heap.py::test_preserve_ref_field
succeeds when run on it's own, but fails when run as a group (e.g. with pytest test_heap.py
), I looked at the generated code and it's functionally identical in both cases.
All three tests in test_heap.py
creat functions called test_fnc
and global cells called gcl
, it then loads the generated shared libraries. The first two tests are supposed to return the number 42, the last one is supposed to return 298, but actually returns 42, as such I think it's quite possible when loading a shared library with an alias defined, it doesn't properly override the previous alias.
I am defining aliases using .equiv
, like so:
.globl __mu_gcl
__mu_gcl:
.globl gcl
.equiv gcl, __mu_gcl
And the same with test_func
.
I could try and replace the aliases with labels, but then the function would have two names, and may cause problems if we try and resolve an address to a name (which we don't currently do, except for native functions in back trace printing).
Perhaps I could use another directive (like .set
, or .eqv
, but the docs say their the same).