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]

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


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