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]

Re: 2.12 branch will be cut on Saturday


On Sun, Feb 10, 2002 at 10:42:35PM +0100, Christian Jönsson wrote:
> > FAIL: S-records with constructors
> 
> I agree with you. Still, the S-records is failing and perhaps that's a
> binutils on sparc issue. Since we all heard you're the expert, :-), do
> you think you perhaps could look into this specific failure?

Certainly not an expert on S-records (don't know about this binary format
anything).
Anyway, objdump -x diff of (ELF->srec objcopy, direct srec link) is:
 Idx Name          Size      VMA               LMA               File off
Algn
   0 .sec1         0000020c  0000000000001000  0000000000001000  00000026 2**0
                   CONTENTS, ALLOC, LOAD
-  1 .sec2         0000001b  0000000000001210  0000000000001210  0000060c 2**0
+  1 .sec2         00000020  0000000000001210  0000000000001210  0000060c 2**0
                   CONTENTS, ALLOC, LOAD
-  2 .sec3         0000000c  000000000001122c  000000000001122c  0000065e 2**0
+  2 .sec3         0000000c  0000000000011230  0000000000011230  00000668 2**0
                   CONTENTS, ALLOC, LOAD

where ELF link has the interesting sections:
  [ 1] .text             PROGBITS        00001000 001000 00020c 00  AX  0 0 4
  [ 2] .rodata           PROGBITS        00001210 001210 00001b 01  A   0 0 8
  [ 3] .data             PROGBITS        0001122c 00122c 000004 00 WA   0 0 4
  [ 4] .ctors            PROGBITS        00011230 001230 000004 00 WA   0 0 1
  [ 5] .dtors            PROGBITS        00011234 001234 000004 00 WA   0 0 1
  [ 6] .bss              NOBITS          00011238 001238 000058 00 WA   0 0 4

Contents of section .rodata:
 1210 6175746f 6d617469 635f666f 6f000000  automatic_foo...
 1220 73746174 69635f66 6f6f00             static_foo.

which is that in ELF a section size is not rounded up to its alignment, only
next section start is rounded up to next section alignment.
In srec, it looks like .rodata size is rounded up to its alignment.

	Jakub


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