Bug 19338 - ld.gold: error: address of section '.bss' moves backward from 0x73163c to 0x7315b8
Summary: ld.gold: error: address of section '.bss' moves backward from 0x73163c to 0x7...
Status: NEW
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.27
: P2 normal
Target Milestone: ---
Assignee: Cary Coutant
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-07 09:30 UTC by Florian Ager
Modified: 2017-09-03 16:42 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Linker script + command line output (2.03 KB, application/x-zip-compressed)
2015-12-07 09:30 UTC, Florian Ager
Details
Linker Script (904 bytes, text/plain)
2015-12-07 09:36 UTC, Florian Ager
Details
Command Line Output (946 bytes, text/plain)
2015-12-07 09:36 UTC, Florian Ager
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Ager 2015-12-07 09:30:40 UTC
Created attachment 8834 [details]
Linker script + command line output

I got following errors if linking with the Gold linker from binutils-gdb master checkout from 04.12.2015

/usr/bin/ld.gold: error: address of section '.bss' moves backward from 0x73163c to 0x7315b8
/usr/bin/ld.gold: error: address 0x0 moves dot backwards in region ram
/usr/bin/ld.gold: error: address of section '.bss' moves backward from 0x726f2c to 0x726ea8

On the slow Standard Gnu linker, it works correct.


If I use the official Version of binutils (2.25.1) I got much more Errors:

/usr/bin/ld.gold: error: address of section '.ARM.extab' moves backward from 0x57f720 to 0x0
/usr/bin/ld.gold: error: address of section '.ARM.exidx' moves backward from 0x5e038c to 0x60c6c
/usr/bin/ld.gold: error: address of section '.rodata' moves backward from 0x621d7c to 0xa2660
/usr/bin/ld.gold: error: address of section '.data' moves backward from 0x703c34 to 0xa2660
/usr/bin/ld.gold: error: address of section '.bss' moves backward from 0x7315a8 to 0xa2660
/usr/bin/ld.gold: error: load segment overlap [0x0 -> 0x746a10] and [0xcffd0 -> 0xd0054]
/usr/bin/ld.gold: error: address of section '.ARM.extab' moves backward from 0x57f720 to 0xb7ac8
/usr/bin/ld.gold: error: address of section '.ARM.exidx' moves backward from 0x5e038c to 0x118734
/usr/bin/ld.gold: error: address of section '.rodata' moves backward from 0x6174ec to 0x14f898
/usr/bin/ld.gold: error: address of section '.data' moves backward from 0x6f93a4 to 0x14f898
/usr/bin/ld.gold: error: address of section '.bss' moves backward from 0x726d18 to 0x14f898
/usr/bin/ld.gold: error: load segment overlap [0x0 -> 0x73c180] and [0x17d208 -> 0x17d28c]
collect2.exe: error: ld returned 1 exit Status
Comment 1 Florian Ager 2015-12-07 09:36:04 UTC
Created attachment 8835 [details]
Linker Script
Comment 2 Florian Ager 2015-12-07 09:36:41 UTC
Created attachment 8836 [details]
Command Line Output
Comment 3 rdiezmail-binutils 2017-09-03 16:42:58 UTC
I have hit this issue too.

I am using Gold version 1.14 (bundled with GNU Binutils 2.28).

I have now upgraded an open-source project of mine in order to demonstrate it. It is here:

https://github.com/rdiez/JtagDue

Before building the project, edit configure.ac and change 'false' to 'true' in this line:

AM_CONDITIONAL([USE_GOLD_LINKER], [false])

Then you will get the following error messages:

/home/blah.../arm-none-eabi/bin/ld.gold: warning: creating a segment to contain the file and program headers outside of any MEMORY region
/home/blah.../arm-none-eabi/bin/ld.gold: error: address of section '.ARM.exidx' moves backward from 0x90bbc to 0x90bb8
/home/blah.../arm-none-eabi/bin/ld.gold: error: address of section '.jcr' moves backward from 0x9188c to 0x90bbc
/home/blah.../arm-none-eabi/bin/ld.gold: error: address of section '.tm_clone_table' moves backward from 0x91890 to 0x90bc0
/home/blah.../arm-none-eabi/bin/ld.gold: error: address of section '.got' moves backward from 0x91890 to 0x90bc0
/home/blah.../arm-none-eabi/bin/ld.gold: error: load segment overlap [0x80000 -> 0x918a0] and [0x91888 -> 0x91c48]
/home/blah.../arm-none-eabi/bin/ld.gold: error: address of section '.ARM.exidx' moves backward from 0xa244c to 0xa2448
/home/blah.../arm-none-eabi/bin/ld.gold: error: address of section '.jcr' moves backward from 0xa2d2c to 0xa244c
/home/blah.../arm-none-eabi/bin/ld.gold: error: address of section '.tm_clone_table' moves backward from 0xa2d30 to 0xa2450
/home/blah.../arm-none-eabi/bin/ld.gold: error: address of section '.got' moves backward from 0xa2d30 to 0xa2450
/home/blah.../arm-none-eabi/bin/ld.gold: error: load segment overlap [0x91000 -> 0xa2d40] and [0xa2d28 -> 0xa30e8]

I also had to disable option --warn-section-align , which does not seem to be supported by Gold.