This is the mail archive of the binutils@sourceware.org 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] Prevent .noinit section from incorrect placement


2016-01-22 11:38 GMT+03:00 Sivanupandi, Pitchumani
<Pitchumani.Sivanupandi@atmel.com>:
> This patch is similar to:
> https://sourceware.org/ml/binutils/2014-07/msg00033.html
>
> When .data and .bss sections are empty .noinit section is placed at data
> region's start. This will be incorrect for devices that has different
> data start address than data region start in linker script.
>
> Test case:
>   1 int volatile a __attribute__((section(".noinit")));
>   2 void main ()
>   3 {
>   4   while (1)
>   5     a++;
>   6 }
>
> avr-gcc -O1 -Wl,-gc-sections -mmcu=attiny841
>
> Below patch updates .noinit section's VMA to end of .bss section. So, .noinit
> section will be placed at .data section address (-Tdata=<address>) when .data
> and .bss sections are empty.
>
> If ok, could someone commit please? I do not have commit access.
>

Committed.

Denis.


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