Open Quuxplusone opened 3 years ago
Bugzilla Link | PR48563 |
Status | NEW |
Importance | P normal |
Reported by | Nick Andrews (kalamatee@gmail.com) |
Reported on | 2020-12-20 05:33:55 -0800 |
Last modified on | 2020-12-22 16:01:38 -0800 |
Version | 10.0 |
Hardware | PC Windows NT |
CC | htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, rnk@google.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
This is more likely to be a difference in behavior between the gnu binutils
assembler and the LLVM MC assembler. (llvm-mc vs as) Does the problem go away
if you add -fno-integrated-as?
As an alternative workaround, can you replace the module level assembly with an
alias attribute, like so?
void foo () __attribute__ ((weak, alias ("bar")));
I'm not 100% confident that the above is equivalent, but the idea of a weak
alias is surely representable without asm.
> This is more likely to be a difference in behavior between the gnu binutils
assembler and the LLVM MC assembler. (llvm-mc vs as)
> Does the problem go away if you add -fno-integrated-as?
I'm currently looking at how we may integrate this into the build for the
affected components. Atleast for the test case itself it appears to work
however using the switch wholesale in our build causes other breakage earlier.
> As an alternative workaround, can you replace the module level assembly with
an alias attribute, like so?
> void foo () __attribute__ ((weak, alias ("bar")));
> I'm not 100% confident that the above is equivalent, but the idea of a weak
alias > is surely representable without asm
I don't think I cant get it to work this way, atleast not with my attempts so
far. The code where this is predominantly used may or may not include
prototypes for either of the aliased function, or the function itself - or
both, which causes various errors in my attempts so far.
(In reply to Nick Andrews from comment #2)
> > This is more likely to be a difference in behavior between the gnu binutils
assembler and the LLVM MC assembler. (llvm-mc vs as)
>
> > Does the problem go away if you add -fno-integrated-as?
>
> I'm currently looking at how we may integrate this into the build for the
> affected components. Atleast for the test case itself it appears to work
> however using the switch wholesale in our build causes other breakage
> earlier.
>
Ok this also doesn't work for us in practice. Adding it to the necessary flags
for the modules results in other failure (.s files processed using the compiler
with -x assembler-with-cpp now have problems).