This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix .sbss for ELF/ppc64 (Re: Why does ELF/ppc expect .plt NOBITS?)


On Thu, Jul 24, 2003 at 12:53:10PM -0700, H. J. Lu wrote:
> On Thu, Jul 24, 2003 at 12:49:04PM -0700, H. J. Lu wrote:
> > On Thu, Jul 24, 2003 at 09:13:57PM +0200, Jakub Jelinek wrote:
> > > On Thu, Jul 24, 2003 at 12:07:26PM -0700, H. J. Lu wrote:
> > > > Hi Alan,
> > > > 
> > > > ld-powerpc tests expect the .plt section is SHT_NOBITS. Any particular
> > > > reason for that?
> > > 
> > > Because ppc and ppc64 .plt sections are SHT_NOBITS as per their psABI?
> > > 
> > 
> > Let me guess. ppc and ppc64 psABIs also want .sbss to be SHT_PROGBITS?
> > 
> > 
> 
> Where can I get the current ppc and ppc64 psABI? The ppc psABI I have
> says .plt is SHT_PROGBITS and .sbss is SHT_NOBITS.

It looks like there is a typo in my copy. .plt is SHT_NOBITS. But
what should .sbss be for ppc64? If it is SHT_NOBITS like ppc, here
is a patch to fix testcases


H.J.
---
2003-07-24  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-powerpc/tlsexe.r: .sbss is NOBITS, not PROGBITS.
	* ld-powerpc/tlsexetoc.r: Likewise.
	* ld-powerpc/tlsso.r: Likewise.
	* ld-powerpc/tlstocso.r: Likewise.

--- ld-powerpc/tlsexe.r.psABI	2003-06-10 07:52:06.000000000 -0700
+++ ld-powerpc/tlsexe.r	2003-07-24 13:39:36.000000000 -0700
@@ -23,7 +23,7 @@ Section Headers:
  +\[11\] \.tbss +NOBITS +0+100104c0 0+4c0 0+38 0+ WAT +0 +0 +8
  +\[12\] \.dynamic +DYNAMIC +0+100104c0 0+4c0 0+150 10 +WA +4 +0 +8
  +\[13\] \.got +PROGBITS +0+10010610 0+610 0+30 08 +WA +0 +0 +8
- +\[14\] \.sbss +PROGBITS +0+10010640 0+640 0+ 0+ +W +0 +0 +1
+ +\[14\] \.sbss +NOBITS +0+10010640 0+640 0+ 0+ +W +0 +0 +1
  +\[15\] \.plt +NOBITS +0+10010640 0+640 0+30 18 +WA +0 +0 +8
  +\[16\] \.bss +NOBITS +0+10010670 0+640 0+ 0+ +WA +0 +0 +1
  +\[17\] \.shstrtab +STRTAB +0+ 0+640 0+8a 0+ +0 +0 +1
--- ld-powerpc/tlsexetoc.r.psABI	2003-07-10 07:27:30.000000000 -0700
+++ ld-powerpc/tlsexetoc.r	2003-07-24 13:39:43.000000000 -0700
@@ -23,7 +23,7 @@ Section Headers:
  +\[11\] \.tbss +NOBITS +0+10010448 0+448 0+38 0+ WAT +0 +0 +8
  +\[12\] \.dynamic +DYNAMIC +0+10010448 0+448 0+150 10 +WA +4 +0 +8
  +\[13\] \.got +PROGBITS +0+10010598 0+598 0+58 08 +WA +0 +0 +8
- +\[14\] \.sbss +PROGBITS +0+100105f0 0+5f0 0+ 0+ +W +0 +0 +1
+ +\[14\] \.sbss +NOBITS +0+100105f0 0+5f0 0+ 0+ +W +0 +0 +1
  +\[15\] \.plt +NOBITS +0+100105f0 0+5f0 0+30 18 +WA +0 +0 +8
  +\[16\] \.bss +NOBITS +0+10010620 0+5f0 0+ 0+ +WA +0 +0 +1
  +\[17\] \.shstrtab +STRTAB +0+ 0+5f0 0+8a 0+ +0 +0 +1
--- ld-powerpc/tlsso.r.psABI	2003-06-10 07:52:06.000000000 -0700
+++ ld-powerpc/tlsso.r	2003-07-24 13:39:49.000000000 -0700
@@ -21,7 +21,7 @@ Section Headers:
  +\[10\] \.tbss +NOBITS +0+107f8 0+7f8 0+38 0+ WAT +0 +0 +8
  +\[11\] \.dynamic +DYNAMIC +0+107f8 0+7f8 0+150 10 +WA +3 +0 +8
  +\[12\] \.got +PROGBITS +0+10948 0+948 0+60 08 +WA +0 +0 +8
- +\[13\] \.sbss +PROGBITS +0+109a8 0+9a8 0+ 0+ +W +0 +0 +1
+ +\[13\] \.sbss +NOBITS +0+109a8 0+9a8 0+ 0+ +W +0 +0 +1
  +\[14\] \.plt +NOBITS +0+109a8 0+9a8 0+30 18 +WA +0 +0 +8
  +\[15\] \.bss +NOBITS +0+109d8 0+9a8 0+ 0+ +WA +0 +0 +1
  +\[16\] \.shstrtab +STRTAB +0+ 0+9a8 0+82 0+ +0 +0 +1
--- ld-powerpc/tlstocso.r.psABI	2003-07-10 07:27:31.000000000 -0700
+++ ld-powerpc/tlstocso.r	2003-07-24 13:42:33.000000000 -0700
@@ -21,7 +21,7 @@ Section Headers:
  +\[10\] \.tbss +NOBITS +0+10740 0+740 0+38 0+ WAT +0 +0 +8
  +\[11\] \.dynamic +DYNAMIC +0+10740 0+740 0+150 10 +WA +3 +0 +8
  +\[12\] \.got +PROGBITS +0+10890 0+890 0+58 08 +WA +0 +0 +8
- +\[13\] \.sbss +PROGBITS +0+108e8 0+8e8 0+ 0+ +W +0 +0 +1
+ +\[13\] \.sbss +NOBITS +0+108e8 0+8e8 0+ 0+ +W +0 +0 +1
  +\[14\] \.plt +NOBITS +0+108e8 0+8e8 0+30 18 +WA +0 +0 +8
  +\[15\] \.bss +NOBITS +0+10918 0+8e8 0+ 0+ +WA +0 +0 +1
  +\[16\] \.shstrtab +STRTAB +0+ 0+8e8 0+82 0+ +0 +0 +1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]