https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94391
--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Yuxuan Shui from comment #11) > (In reply to Andrew Pinski from comment #8) > > Also it is wrong for a person to assume a normal C variable could be > > SHN_ABS; that is the bug here. It is a bug in the user code. > > I showed up to fix it by using an top level inline-asm. > > Why is this wrong? Is it written down somewhere that a C variable can never > be SHN_ABS, perhaps in the standard, or in the X86-psABI? > > If this is wrong, then what is the correct way to access a SHN_ABS symbol? > Is it just no way to do it? If so, what's the purpose of objcopy generating > such symbols? Have you tried my way with ld? Lld bug is a different issue.