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: [Patch, avr] Set data section's LMA to AT> text instead of end of .text

Hi Senthil,

Thanks - I now understand the problem now. You were right with your original email, I just did not quite get that the .data section was using an explicit LMA assigment which was not taking into account the fact that *other* sections might be assigned to the TEXT memory region *after* the .text section. So the SIZEOF operator does work - it is just that it only returns the size of the .text section, not the size of the .text section and any other sections that follow it in the same region.

So, upon reflection I now agree with your original patch. Please go ahead and commit it. I will update the MSP430 linker script with a similar change.


PS. FYI you can avoid using extra linker scripts in the way that you showed in your test case. If you change the section attribute in test.c to be:

  int x __attribute__((section(".boot,\"ax\",@progbits ;")));

then you do not need a "boot" linker script at all.

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