This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Link problems with section anchors
>>>>> Richard Sandiford writes:
Richard> Ick. I really have to question whether that's valid. GCC does care
Richard> whether something is link-once or not -- as this PR proves -- so changing
Richard> it behind GCC's back seems like a very bad idea.
Yes, as is being discussed on #gcc, changing sections with GCC
__attribute__ is fine, but this code is changing section semantics behind
the compiler's back. One simply cannot expect that to work. Linkonce
sections are not just a blackbox string value for GCC to emit.
Paul Brook suggests adding
CFLAGS-strtoul.c=-fno-section-anchors
to Glibc for all files that explicitly declare symbols in linkonce
sections. That certainly seems appropriate to me.
David