This is the mail archive of the
mailing list for the GCC project.
r242893 - in /trunk/gcc: ChangeLog config/darwi...
- From: iains at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Sun, 27 Nov 2016 14:21:52 -0000
- Subject: r242893 - in /trunk/gcc: ChangeLog config/darwi...
Date: Sun Nov 27 14:21:51 2016
New Revision: 242893
[Darwin, ld64] Make PIC indirections and constant labels linker-visible.
If we have a situation like:
ld64 will be unable to split this into two atoms (because the "L" makes
the second symbol 'invisible'). This means that legitimate direct accesses
to the second symbol will appear to be non-allowed direct accesses to an
atom of type weak, global which are not allowed.
To avoid this, we make the indirections have a leading 'l' (lower-case L)
which has a special meaning: linker can see this and use it to determine
atoms, but it is not placed into the final symbol table.
The implementation here is somewhat heavy-handed in that it will also mark
indirections to the __IMPORT,__pointers section the same way which is
really unnecessary, since ld64 _can_ split those into atoms as they are
fixed size. FIXME: determine if this is a penalty worth extra code to
ld64 can't split the second, causing a warning when it's directly
2016-11-27 Iain Sandoe <firstname.lastname@example.org>
* config/darwin.c (imachopic_indirection_name): Make data
section indirections linker-visible.
* config/darwin.h (ASM_GENERATE_INTERNAL_LABEL): Make local
constant labels linker-visible.