[parisc-linux] binutils 2.15?

Jakub Jelinek jakub@redhat.com
Thu Jul 1 23:00:00 GMT 2004


On Thu, Jul 01, 2004 at 06:49:44PM -0400, John David Anglin wrote:
> The enclosed patch moves .plt back to where it was before Jakub's change
> when NO_SMALL_DATA isn't defined.  We don't define NO_SMALL_DATA on
> PA-RISC as we need support for .sbss and .sdata.
> 
> This fixes the regressions.  The alternatives look messy impacting
> both gcc and glibc.

I think you want a new variable to control that instead (set on just hppa,
not set on other arches).
There are many small data targets where you IMHO want .plt where it is ATM
(anything starting from .data onwards can be overwritten by buffer overflow,
backward data overflows are much less common),  and furthermore rewriting
all the ld/testsuite tests again takes a lot of time.

> 2004-07-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
> 
> 	* scripttempl/elf.sc: Place PLT before GOT when NO_SMALL_DATA is not
> 	defined.
> 
> Index: scripttempl/elf.sc
> ===================================================================
> RCS file: /cvs/src/src/ld/scripttempl/elf.sc,v
> retrieving revision 1.45
> diff -u -3 -p -r1.45 elf.sc
> --- scripttempl/elf.sc	15 Jun 2004 16:39:17 -0000	1.45
> +++ scripttempl/elf.sc	1 Jul 2004 22:03:14 -0000
> @@ -358,7 +358,7 @@ cat <<EOF
>    ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
>    ${NO_SMALL_DATA+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
>  
> -  ${DATA_PLT+${PLT}}
> +  ${NO_SMALL_DATA+${DATA_PLT+${PLT}}}
>  
>    .data         ${RELOCATING-0} :
>    {
> @@ -370,6 +370,7 @@ cat <<EOF
>    .data1        ${RELOCATING-0} : { *(.data1) }
>    ${WRITABLE_RODATA+${RODATA}}
>    ${OTHER_READWRITE_SECTIONS}
> +  ${NO_SMALL_DATA-${DATA_PLT+${PLT}}}
>    ${RELOCATING+${OTHER_GOT_SYMBOLS}}
>    ${NO_SMALL_DATA-${GOT}}
>    ${OTHER_GOT_SECTIONS}

	Jakub



More information about the Binutils mailing list