This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Empty sbss sections on ARM
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 7 Oct 2003 17:33:43 -0400
- Subject: Re: Empty sbss sections on ARM
- References: <20030926154938.GA10875@nevyn.them.org> <200309261557.h8QFvdf10030@pc960.cambridge.arm.com>
On Fri, Sep 26, 2003 at 04:57:39PM +0100, Richard Earnshaw wrote:
> > Is there any reason not to apply this patch? None of the other sbss
> > infrastructure appears to be present for ARM.
> >
> > In other news, the empty .sbss section created without this patch is marked
> > as alignment 2**0, SHT_PROGBITS, CONTENTS. Which is obviously wrong but I'm
> > not sure how to fix that. That's what got me looking at the problem; the
> > prelinker in some situations gets quite upset by this.
> >
> > --
> > Daniel Jacobowitz
> > MontaVista Software Debian GNU/Linux Developer
> >
> > 2003-09-26 Daniel Jacobowitz <drow@mvista.com>
> >
> > * emulparams/armelf_linux.sh: Define NO_SMALL_DATA.
> >
> > --- binutils-2.14/ld/emulparams/armelf_linux.sh.orig 2003-09-26 11:08:26.000000000 -0400
> > +++ binutils-2.14/ld/emulparams/armelf_linux.sh 2003-09-26 11:08:52.000000000 -0400
> > @@ -16,3 +16,5 @@ OTHER_BSS_SYMBOLS='__bss_start__ = .;'
> > OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
> >
> > TEXT_START_ADDR=0x00008000
> > +
> > +NO_SMALL_DATA=yes
>
> I think this should be done for all ARM/ELF configurations. ARM
> processors don't have support for .sfoo sections.
>
> It strikes me as somewhat bizzare that one has to disable this when not
> needed rather than enable it when needed. Ho hum...
No kidding. Lots of other targets have these sections unnecessarily
too... I may be back.
Here's a patch to disable sdata in linker scripts for all ELF ARM targets. OK?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-10-07 Daniel Jacobowitz <drow@mvista.com>
* emulparams/armelf.sh: Define NO_SMALL_DATA.
* emulparams/armelf_linux.sh, emulparams/armelf_oabi.sh,
emulparams/armnto.sh: Likewise.
Index: ld/emulparams/armelf.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/armelf.sh,v
retrieving revision 1.10
diff -u -p -r1.10 armelf.sh
--- ld/emulparams/armelf.sh 1 Apr 2003 13:08:06 -0000 1.10
+++ ld/emulparams/armelf.sh 7 Oct 2003 21:30:50 -0000
@@ -23,3 +23,6 @@ EMBEDDED=yes
# This sets the stack to the top of the simulator memory (2^19 bytes).
STACK_ADDR=0x80000
+
+# ARM does not support .s* sections.
+NO_SMALL_DATA=yes
Index: ld/emulparams/armelf_linux.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/armelf_linux.sh,v
retrieving revision 1.8
diff -u -p -r1.8 armelf_linux.sh
--- ld/emulparams/armelf_linux.sh 1 Apr 2003 13:08:06 -0000 1.8
+++ ld/emulparams/armelf_linux.sh 7 Oct 2003 21:30:50 -0000
@@ -15,3 +15,6 @@ OTHER_BSS_SYMBOLS='__bss_start__ = .;'
OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
TEXT_START_ADDR=0x00008000
+
+# ARM does not support .s* sections.
+NO_SMALL_DATA=yes
Index: ld/emulparams/armelf_oabi.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/armelf_oabi.sh,v
retrieving revision 1.3
diff -u -p -r1.3 armelf_oabi.sh
--- ld/emulparams/armelf_oabi.sh 22 Nov 2001 09:08:04 -0000 1.3
+++ ld/emulparams/armelf_oabi.sh 7 Oct 2003 21:30:50 -0000
@@ -18,3 +18,6 @@ EMBEDDED=yes
# This sets the stack to the top of the simulator memory (2^19 bytes).
STACK_ADDR=0x80000
+
+# ARM does not support .s* sections.
+NO_SMALL_DATA=yes
Index: ld/emulparams/armnto.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/armnto.sh,v
retrieving revision 1.1
diff -u -p -r1.1 armnto.sh
--- ld/emulparams/armnto.sh 30 Jul 2002 17:32:28 -0000 1.1
+++ ld/emulparams/armnto.sh 7 Oct 2003 21:30:50 -0000
@@ -22,3 +22,6 @@ ENTRY=_start
# This sets the stack to the top of the simulator memory (2^19 bytes).
STACK_ADDR=0x80000
+
+# ARM does not support .s* sections.
+NO_SMALL_DATA=yes