https://sourceware.org/bugzilla/show_bug.cgi?id=18847
Bug ID: 18847
Summary: Gold: Address of section moves backward when aligned.
Product: binutils
Version: 2.25
Status: NEW
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: johan.karlsson at enea dot com
CC: ian at airs dot com
Target Milestone: ---
Created attachment 8532
--> https://sourceware.org/bugzilla/attachment.cgi?id=8532&action=edit
section_pointer_increase.patch
When using a linker script that added alignment for the output section I got
the following error:
ld.gold: error: address of section '.bss' moves backward from 0x10200b0 to
0x101ecc0
Simplified the linker script looked like this:
.data ALIGN(0x10000) :
{
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
} > mem :ph_ram
.bss :
{
*(.bss)
*(.bss.*)
*(COMMON)
*(.gnu.linkonce.b.*)
} > mem :ph_ram
I'm attaching a patch that fixes the problem. The way I saw it was that when
the alignment was added a specific address was assigned to that section and
there by the output section pointer was not increased with its size.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils