This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [parisc-linux] binutils 2.15?
- From: Jakub Jelinek <jakub at redhat dot com>
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: Alan Modra <amodra at bigpond dot net dot au>, soete dot joel at tiscali dot be, parisc-linux at parisc-linux dot org, binutils at sources dot redhat dot com
- Date: Thu, 1 Jul 2004 18:59:58 -0400
- Subject: Re: [parisc-linux] binutils 2.15?
- References: <20040614120820.GG28716@bubble.modra.org> <200407012249.i61MnikF010941@hiauly1.hia.nrc.ca>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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