[PATCH] Make libgcc.a symbols .hidden (fix for non-GNU make, take 2)

John David Anglin dave@hiauly1.hia.nrc.ca
Fri Mar 1 09:36:00 GMT 2002


> Please remove @ in:
> echo '	@$(NM_FOR_TARGET) '${SHLIB_NM_FLAGS} ${o}' | $(AWK) '\''NF == 3 { print ".hidden", $$3 }'\'' | $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -r -nostdinc -nostdlib -o $@ '${o}' -xassembler -'
> See what exactly it prints. Also sticking "tee /tmp/hidden.s | " right
> before $(GCC_FOR_TARGET) might give some interesting info too
> (as well as plain nm -pg libgcc/_divI.o).

Without '@':
./xgcc -B./ -B/opt/gnu64/hppa64-hp-hpux11.11/bin/ -isystem /opt/gnu64/hppa64-hp-
hpux11.11/include -isystem /opt/gnu64/hppa64-hp-hpux11.11/sys-include -O2  -DIN_
GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isyste
m ./include  -fPIC -Dpa64=1 -DELF=1 -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  
-I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/config -I../../gcc/gcc
/../include -DL_divI -xassembler-with-cpp -c ../../gcc/gcc/config/pa/milli64.S -
o libgcc/./_divI.o
nm -pg libgcc/./_divI.o | gawk 'NF == 3 { print ".hidden", $3 }' | ./xgcc -B./ -
B/opt/gnu64/hppa64-hp-hpux11.11/bin/ -isystem /opt/gnu64/hppa64-hp-hpux11.11/inc
lude -isystem /opt/gnu64/hppa64-hp-hpux11.11/sys-include -O2  -DIN_GCC    -W -Wa
ll -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  
-fPIC -Dpa64=1 -DELF=1 -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -r -nostdinc 
-nostdlib -o libgcc/./_divI.oS libgcc/./_divI.o -xassembler -
{standard input}: Assembler messages:
{standard input}:1: Fatal error: Unknown opcode: `$$divi'
make[3]: *** [libgcc/./_divI.oS] Error 1

nm -pg libgcc/_divI.o:
0000000000000000000004 M  $$divI
0000000000000000000000 U  $$divI_10
0000000000000000000000 U  $$divI_12
0000000000000000000000 U  $$divI_14
0000000000000000000000 U  $$divI_15
0000000000000000000000 U  $$divI_2
0000000000000000000000 U  $$divI_3
0000000000000000000000 U  $$divI_4
0000000000000000000000 U  $$divI_5
0000000000000000000000 U  $$divI_6
0000000000000000000000 U  $$divI_7
0000000000000000000000 U  $$divI_8
0000000000000000000000 U  $$divI_9
0000000000000000000000 M  $$divoI

/tmp/hidden.s:
.hidden $$divI
.hidden $$divoI

On the PA, there needs to be whitespace (e.g., a tab) before the
".hidden" directive.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)



More information about the Gcc-patches mailing list