This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Make libgcc.a symbols .hidden
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 2 Mar 2002 03:51:06 -0500 (EST)
- Subject: Re: [PATCH] Make libgcc.a symbols .hidden
On 1 Mar 2002 cgd@broadcom.com wrote:
> The problem manifests itself when building the little-endian mips16(!)
> multilibs:
>
> ./xgcc -B./ -B/home/cgd/proj/gcc-testing/install64/mips64-elf/bin/ -isystem /home/cgd/proj/gcc-testing/install64/mips64-elf/include -isystem /home/cgd/proj/gcc-testing/install64/mips64-elf/sys-include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -G 0 -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I/home/cgd/proj/gcc-testing/combined/gcc -I/home/cgd/proj/gcc-testing/combined/gcc/. -I/home/cgd/proj/gcc-testing/combined/gcc/config -I/home/cgd/proj/gcc-testing/combined/gcc/../include -EL -DL_m16addsf3 -xassembler-with-cpp -c /home/cgd/proj/gcc-testing/combined/gcc/config/mips/mips16.S -o libgcc/el/_m16addsf3.o
> ./nm -pg libgcc/el/_m16addsf3.o | gawk 'NF == 3 { print ".hidden", $3 }' | ./xgcc -B./ -B/home/cgd/proj/gcc-testing/install64/mips64-elf/bin/ -isystem /home/cgd/proj/gcc-testing/install64/mips64-elf/include -isystem /home/cgd/proj/gcc-testing/install64/mips64-elf/sys-include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -G 0 -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -r -nostdinc -nostdlib -o libgcc/el/_m16addsf3.oS libgcc/el/_m16addsf3.o -xassembler -
> ./collect-ld: libgcc/el/_m16addsf3.o: compiled for a little endian system and target is big endian
> File in wrong format: failed to merge target specific data of file libgcc/el/_m16addsf3.o
A method with less impact (as in not using previously unused
constructs in gcc like -r) IMHO would have been to append (or
prepend) the "\t.hidden foo" to the generated assembly file.
Comparing .o with .oS, I see .eh_frame in the latter on
mmix-knuth-mmixware -- after fixing LINK_SPEC to cater to "-r"
by emitting ELF not mmo and to not set special symbols. :-/
brgds, H-P