This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81733] New: stage1 libgcc_s.dylib fails to link on Darwin 11/x86_64
- From: "ro at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 05 Aug 2017 15:58:21 +0000
- Subject: [Bug target/81733] New: stage1 libgcc_s.dylib fails to link on Darwin 11/x86_64
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81733
Bug ID: 81733
Summary: stage1 libgcc_s.dylib fails to link on Darwin
11/x86_64
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: ro at gcc dot gnu.org
CC: iains at gcc dot gnu.org, mrs at gcc dot gnu.org
Target Milestone: ---
Target: x86_64-apple-darwin11.4.2
Created attachment 41932
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41932&action=edit
hack to allow the build to finish
Since roughly 20170707, Darwin 11/x86_64 bootstrap is broken. The stage1
libgcc_s.dylib fails to link with and ld64 assertion failure:
Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse,
file /SourceCache/ld64/ld64-128.2/src/ld/parsers/macho_relocatable_file.cpp,
line 1519.
0 0x10443f1df __assert_rtn + 79
1 0x10445aae5
mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions
const&) + 917
2 0x10444832e mach_o::relocatable::Parser<x86_64>::parse(unsigned char
const*, unsigned long long, char const*, long, unsigned int,
mach_o::relocatable::ParserOptions const&) + 286
3 0x104444b2b mach_o::relocatable::parse(unsigned char const*, unsigned long
long, char const*, long, unsigned int, mach_o::relocatable::ParserOptions
const&) + 91
4 0x10447d6fd ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool)
+ 653
5 0x10447ecfb ld::tool::InputFiles::InputFiles(Options&, char const**) + 651
6 0x10443f426 main + 358
7 0x10442f6a4 start + 52
collect2: error: ld returned 1 exit status
make[3]: *** [libgcc_s.dylib] Error 1
make[2]: *** [all-stage1-target-libgcc] Error 2
make[1]: *** [stage1-bubble] Error 2
The failure is similar to the one from PR target/57438.
When I check the input objects with dwarfdump --eh-frame --verify, I find
2 errors found in EH frame for _addvsi3_s.o (x86_64).
2 errors found in EH frame for _subvsi3_s.o (x86_64).
2 errors found in EH frame for _mulvsi3_s.o (x86_64).
2 errors found in EH frame for _negvsi2_s.o (x86_64).
1 errors found in EH frame for _negvdi2_s.o (x86_64).
1 errors found in EH frame for enable-execute-stack_s.o (x86_64).
10 errors found in EH frame for unwind-dw2_s.o (x86_64).
2 errors found in EH frame for emutls_s.o (x86_64)
Looking at the enable-execute-stack_s.o case, I find:
----------------------------------------------------------------------
File: enable-execute-stack_s.o (x86_64)
----------------------------------------------------------------------
Verifying EH Frame... error: FDE row for address 0xfffffffffffffffb is not in
the FDE address range.
0x00000048: FDE
length: 0x00000024
CIE_pointer: 0x00000000
start_addr: 0x000000000000005d ___cold_sect_of___enable_execute_stack
range_size: 0x0000000000000005 (end_addr = 0x0000000000000062)
Instructions: 0x000000000000005d: CFA=rsp+8 rip=[rsp]
DW_CFA_set_loc (0xffffffffffffff9e)
DW_CFA_def_cfa_offset (16)
DW_CFA_offset (rbx, -16)
DW_CFA_nop
DW_CFA_nop
0xfffffffffffffffb: CFA=rsp+16 rbx=[rsp] rip=[rsp+8]
1 errors found in EH frame for enable-execute-stack_s.o (x86_64).
When I compile the corresponding source with -fno-reorder-blocks-and-partition,
the dwarfdump error is gone.
The attached hack allows the build to finish.
Rainer