This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix bootstrap/55571


My recent change to fix PR48076 broke arm-linux, and probably mips-linux,
where one must defer to the kernel in order to achieve a memory barrier
for the currently running cpu.

The __sync* family of functions was put into libgcc.a, and not into the
shared library, so that invocations of these functions would be fast and
not go through symbol resolution and the PLT.

My change ensures that libgcc_s.so.1, like any other library that would
be built, contains a copy of whatever symbols it requires from libgcc.a.
Since these functions are hidden, this does not change the exported ABI
of the shared library.

This does add 3K to the size of libgcc_s.so.  That could be reduced by
breaking up the arm linux-atomic.c file into per-function units.  Or we
just ignore the problem because 3K isn't worth worrying about.

Alternately, we could take this opportunity to adjust things so that
the symbols *are* exported from the shared library.  Obviously we cannot
do this on any of the release branches.  I'll leave that choice to the
ARM maintainers.

Tested on arm-linux-gnueabi, armv7l-unknown-linux-gnueabihf, and a
sanity check on x86_64-linux (wherein libgcc_s.so.1 is unchanged).


r~

Attachment: d-55571-48
Description: Text document

Attachment: d-55571-46
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]