* Bin Cheng via Gcc: > Last question is why do we have __aarch64_have_lse_atomics(and some > other symbols) in both libgcc and glibc? > > #objdump -t /usr/lib64/libc.so.6 | grep "__aarch64_ldadd" > > 0000000000111460 l F .text 0000000000000030 > __aarch64_ldadd8_acq > > 0000000000111370 l F .text 0000000000000030 > __aarch64_ldadd8_relax > > 00000000001114c0 l F .text 0000000000000030 > __aarch64_ldadd8_rel > > 00000000001113d0 l F .text 0000000000000030 > __aarch64_ldadd4_acq
I'm pretty sure those symbols are unexpected symbols in .symtab, i.e., your libc.so.6 is not stripped (which helps debuggers and valgrind). Since glibc uses atomics, it needs to be linked against libgcc.a, and these symbols show up with -moutline-atomics. For your other question, on other targets, it is necessary to rebuild the entire toolchain if you want large code model support. As you saw, some of the pre-built statically linked bits are incompatible with that otherwise. Thanks, Florian -- Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill