Possible bug in m68k-rtems

John Darrington john@darrington.wattle.id.au
Sun Jul 1 08:02:00 GMT 2012


I have configured and built binutils with --target=m68k-rtems

Running a simple test case with the following linker script:

SECTIONS
{
  . = 0x123000;
  foo : { *(one) }
  bar : { *(two) }
}

and the following input code:

.section one
.byte 0x01, 0x02

.section two
.byte 0x03, 0x03

.end


seems to produce the wrong output, as can be seen by objdump -h:


a.out:     file format elf32-m68k

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 foo           00000002  00123000  00123000  00000034  2**0
                  CONTENTS, READONLY
  1 bar           00000002  00123000  00123000  00000036  2**0
                  CONTENTS, READONLY


As you can see, both sections have the same start address, which is incorrect.
Running the same test with a differnet configuration gives the correct results:

a.out:     file format elf32-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 foo           00000002  00123000  00123000  00000034  2**0
                  CONTENTS, READONLY
  1 bar           00000002  00123002  00123002  00000036  2**0
                  CONTENTS, READONLY

Have I misunderstood something or is this a bug?

J'

Attached are the files I used for this test.


-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-bug.tar.gz
Type: application/octet-stream
Size: 378 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20120701/cfa0b67f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20120701/cfa0b67f/attachment.sig>


More information about the Binutils mailing list