2010-08-11 Magnus Granberg #332331 * Makeconfig (+link): Set to +link-pie. (+link-static): Change $(static-start-installed-name) to S$(static-start-installed-name). (+prector): Set to +prectorS. (+postctor): Set to +postctorS. 2011-01-21 Magnus Granberg , squeezy #283470 * sysdeps/unix/sysv/linux/x86_64/sigaction.c fix the __restore_rt symbol --- libc/Makeconfig +++ libc/Makeconfig @@ -447,11 +447,12 @@ $(common-objpfx)libc% $(+postinit),$^) \ $(link-extra-libs) $(link-libc) $(+postctorS) $(+postinit) endif ++link = $(+link-pie) # Command for statically linking programs with the C library. ifndef +link-static +link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \ $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ - $(addprefix $(csu-objpfx),$(static-start-installed-name)) \ + $(addprefix $(csu-objpfx),S$(static-start-installed-name)) \ $(+preinit) $(+prector) \ $(filter-out $(addprefix $(csu-objpfx),start.o \ $(start-installed-name))\ @@ -549,11 +550,10 @@ ifeq ($(elf),yes) +preinit = $(addprefix $(csu-objpfx),crti.o) +postinit = $(addprefix $(csu-objpfx),crtn.o) -+prector = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbegin.o` -+postctor = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o` -# Variants of the two previous definitions for linking PIE programs. +prectorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginS.o` +postctorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtendS.o` ++prector = $(+prectorS) ++postctor = $(+postctorS) +interp = $(addprefix $(elf-objpfx),interp.os) endif csu-objpfx = $(common-objpfx)csu/ --- sysdeps/unix/sysv/linux/x86_64/sigaction.c 2010-12-13 11:47:26.000000000 +0100 +++ sysdeps/unix/sysv/linux/x86_64/sigaction.c 2011-01-29 16:59:51.000000000 +0100 @@ -40,7 +40,7 @@ /* Using the hidden attribute here does not change the code but it helps to avoid warnings. */ -extern void restore_rt (void) asm ("__restore_rt") attribute_hidden; +extern void restore_rt (void) asm ("__restore_rt") __attribute__((__visibility__("hidden"))); /* If ACT is not NULL, change the action for SIG to *ACT. @@ -126,6 +126,7 @@ /* `nop' for debuggers assuming `call' should not disalign the code. */ \ " nop\n" \ ".align 16\n" \ + ".globl __" #name "\n" \ ".LSTART_" #name ":\n" \ " .type __" #name ",@function\n" \ "__" #name ":\n" \