Bug 14592 - gold segfaults with internal error in set_address
Summary: gold segfaults with internal error in set_address
Status: NEW
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.24
: P2 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-17 17:21 UTC by Khem Raj
Modified: 2014-02-19 19:17 UTC (History)
2 users (show)

See Also:
Host:
Target: arm-linux-gnueabi
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Khem Raj 2012-09-17 17:21:44 UTC
gold is segfaulting on ARM using following set up

foo.S

_start:


foo.ld

SECTIONS {
        .stack (NOLOAD) : {
               . = ALIGN(8);
        }
}


$ ./gas/as-new -o foo.o foo.S
$ ./gold/ld-new -T foo.ld foo.o

./gold/ld-new: internal error in set_address, at /home/kraj/work/binutils/gold/output.h:189

I first saw it on 2.22 branch and it is triggered after this commit

commit 624da0376264205e399bc14fe2fa7b6fa659d0ee
Author: Ian Lance Taylor <ian@airs.com>
Date:   Mon Dec 19 21:14:39 2011 +0000

        Copy from mainline to binutils 2.22 branch:


This also happens on trunk


./gold/ld-new --version
GNU gold (GNU Binutils 2.23.51.20120917) 1.11
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
Comment 1 Solomon Peachy 2014-02-19 19:17:53 UTC
I just tripped over this bug, which is still still present in binutils-2.24.

I'm using it on a bare-metal arm toolchain (built with crosstool-ng).  ld.bfd works fine.