This is the mail archive of the 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: ld for coff-m68k

Le mardi 02 octobre 2007 à 11:03 +0100, Nick Clifton a écrit :
> Hi Bruno,

Hi Again ;-)

It works well. I added align 1 to try to change alignment of the data
section and forgot to remove it. I remove it and replace SUBALIGN (2) by
ALIGN(2) and it works also.

Thanks to you



> > If you have a look in the map file
> > 
> > Two bytes are added by the linker after the declaration of DATA_B
> > (*fill*). It is these two bytes that I want to "remove"
> Understood.  So the reason that the bytes are being inserted is that the .data 
> section in the list.o file has a 4-byte alignment requirement.  (Try running 
> "objdump -h list.o" to see this).  You can tell the linker to ignore the 
> alignment requirements of input sections however and instead use your own 
> alignment specification by using the SUBALIGN linker script directive.  So if 
> you change the link_command script so that the data output section looks like this:
>          data 0 : SUBALIGN(2) { *.data }
> and then link your executable you should get the desired results.  (You do not 
> need to add -N or -n to the linker command line).
> Cheers
>    Nick
Bruno Vetel <>

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