[Bug 1725] Output section alignment fix

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Thu Dec 9 14:54:10 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1725

--- Comment #8 from Sebastian Huber <sebastian.huber at embedded-brains.de> 2010-12-09 08:54:09 CST ---
(In reply to comment #7)
> (In reply to comment #6)
[...]
> Can't you just write:
> 
>      .jcr : {
>          KEEP (*(.jcr))
>      } > REGION AT > REGION
>      .rodata : {
>          . = ALIGN(8);
>          *(.rodata .rodata.* .gnu.linkonce.r.*)
>      } > REGION AT > REGION
> 
> <snip>

No, because this "8" is not a constant.  It is actually the maximum alignment
of all input sections.  This is not known a priori.  If someone uses

const int read_only __attribute__((aligned(4096))) = 123;

this "8" would be "4096".  The linker script cannot know this.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list