Bug 17761 – [REG2.075] dmd 2.075.1 creates object files that can't be linked by ld.bfd

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-08-18T10:33:20Z
Last change time
2017-08-25T17:55:47Z
Keywords
link-failure, pull
Assigned to
No Owner
Creator
Atila Neves

Comments

Comment #0 by atila.neves — 2017-08-18T10:33:20Z
ld.gold works fine. To reproduce: $ git clone [email protected]:atilaneves/reggae.git $ dub test /usr/bin/ld: .dub/build/unittest-unittest-linux.posix-x86_64-dmd_2075-77175E7974DDAEB08859943E222FA38D/ut.o: SHT_GROUP section [index 26312] has no SHF_GROUP sections /usr/bin/ld: .dub/build/unittest-unittest-linux.posix-x86_64-dmd_2075-77175E7974DDAEB08859943E222FA38D/ut.o: SHT_GROUP section [index 26313] has no SHF_GROUP sections /usr/bin/ld: .dub/build/unittest-unittest-linux.posix-x86_64-dmd_2075-77175E7974DDAEB08859943E222FA38D/ut.o: SHT_GROUP section [index 26312] has no SHF_GROUP sections /usr/bin/ld: .dub/build/unittest-unittest-linux.posix-x86_64-dmd_2075-77175E7974DDAEB08859943E222FA38D/ut.o: SHT_GROUP section [index 26313] has no SHF_GROUP sections /usr/bin/ld: .dub/build/unittest-unittest-linux.posix-x86_64-dmd_2075-77175E7974DDAEB08859943E222FA38D/ut.o: SHT_GROUP section [index 26312] has no SHF_GROUP sections /usr/bin/ld: .dub/build/unittest-unittest-linux.posix-x86_64-dmd_2075-77175E7974DDAEB08859943E222FA38D/ut.o: SHT_GROUP section [index 26313] has no SHF_GROUP sections /usr/bin/ld: .dub/build/unittest-unittest-linux.posix-x86_64-dmd_2075-77175E7974DDAEB08859943E222FA38D/ut.o: SHT_GROUP section [index 26312] has no SHF_GROUP sections /usr/bin/ld: .dub/build/unittest-unittest-linux.posix-x86_64-dmd_2075-77175E7974DDAEB08859943E222FA38D/ut.o: SHT_GROUP section [index 26313] has no SHF_GROUP sections .dub/build/unittest-unittest-linux.posix-x86_64-dmd_2075-77175E7974DDAEB08859943E222FA38D/ut.o: file not recognized: File format not recognized
Comment #1 by atila.neves — 2017-08-18T10:35:00Z
I forgot to add: this is a regression from dmd 2.074.1 - that version builds fine.
Comment #2 by code — 2017-08-21T14:02:13Z
Please always at least add the exact commit hash/tag when referencing external code in a bug entry. At best use Digger to reduce the test case. Can't reproduce this with reggae: 1e499c7b257c23415b1e745b6bd937f889300b85 unit-threaded: 0.7.28 dmd: v2.075.1 dub: 1.4.0 I used `curl -fsS https://dlang.org/install.sh | bash -s dmd-2.075.1` to get the compiler. On a sidenote, my dub hash is different than yours, not sure what command line flags differ. .dub/build/unittest-unittest-linux.posix-x86_64-dmd_2075-C42D717244B28E601F8D29F4D95527E This is the compiler invocation from dub. dmd -c -of.dub/build/unittest-unittest-linux.posix-x86_64-dmd_2075-C42D717244B28E601F8D29F4D95527E0/ut.o -debug -g -unittest -w -version=Have_reggae -version=Have_unit_threaded -Isrc -Ipayload -I../../../home/dawg/.dub/packages/unit-threaded-0.7.28/unit-threaded/source/ -Jpayload/reggae -Jtests/json bin/ut.d ...
Comment #3 by dfj1esp02 — 2017-08-21T14:11:43Z
Maybe depends on OS/ld version.
Comment #4 by code — 2017-08-21T21:34:02Z
My version `ld.bfd -v` GNU ld version 2.27-24.fc26 Was able to reproduce this in an ArchLinux container. ld.bfd -v GNU ld (GNU Binutils) 2.28.0.20170506 https://github.com/dlang/dmd/pull/7093
Comment #5 by github-bugzilla — 2017-08-25T09:14:16Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/28c6427e1381a127e7a3f9da0a6964b180c1deb8 fix Issue 17761 - don't leave behind empty section groups - check for existing .text.<mangling> section before opening new group section, reuse existing sections in case of colliding mangling https://github.com/dlang/dmd/commit/9ffacf22244d24a62e9c48c1268b8ec256bce687 Merge pull request #7093 from MartinNowak/fix17761 fix Issue 17761 - don't leave behind empty section groups
Comment #6 by github-bugzilla — 2017-08-25T17:55:47Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/28c6427e1381a127e7a3f9da0a6964b180c1deb8 fix Issue 17761 - don't leave behind empty section groups https://github.com/dlang/dmd/commit/9ffacf22244d24a62e9c48c1268b8ec256bce687 Merge pull request #7093 from MartinNowak/fix17761