Summary: | final link failed: bad value | ||
---|---|---|---|
Product: | binutils | Reporter: | Cameron MacPherson <cameron.macpherson> |
Component: | ld | Assignee: | Alan Modra <amodra> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | glaubitz, nickc |
Priority: | P2 | ||
Version: | 2.36 | ||
Target Milestone: | 2.36 | ||
Host: | Target: | powerpc64le-linux, x86_64-linux, aarch64-linux | |
Build: | Last reconfirmed: | 2020-12-23 00:00:00 | |
Bug Depends on: | |||
Bug Blocks: | 28903 |
Description
Cameron MacPherson
2020-12-20 20:02:49 UTC
contents of init/.tmp_main.ver SECTIONS { .rodata : ALIGN(4) { __crc_system_state = .; LONG(0x015af7f4); } } SECTIONS { .rodata : ALIGN(4) { __crc_static_key_initialized = .; LONG(0xbea5ff1e); } } SECTIONS { .rodata : ALIGN(4) { __crc_reset_devices = .; LONG(0xc2e587d1); } } SECTIONS { .rodata : ALIGN(4) { __crc_loops_per_jiffy = .; LONG(0xba497f13); } } This is a generic linker problem, triggered by the presence of two or more output sections of the same name containing LONG() or other data. cat > pr27100.lnk <<\EOF SECTIONS { .rodata : { __crc_system_state = .; LONG(0x015af7f4); } } SECTIONS { .rodata : { __crc_static_key_initialized = .; LONG(0xbea5ff1e); } } EOF cat > pr27100.s <<\EOF .section ".rodata","a",%progbits .space 50 EOF gas/as-new -o pr27100.o pr27100.s ld/ld-new -r -o pr27100 pr27100.o -T pr27100.lnk Looks to be a regression from 2.35 Regressed with 21401fc7bf67db The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=de34d42812a0b978b278cd344abeaee7c71fa55c commit de34d42812a0b978b278cd344abeaee7c71fa55c Author: Alan Modra <amodra@gmail.com> Date: Thu Dec 24 15:56:23 2020 +1030 PR27100, final link failed: bad value The failure on this PR is due to using the same bfd section for multiple output sections. Commit 21401fc7bf67 managed to create duplicate linker script output section statements, but not the actual bfd sections. PR 27100 * ldlang.h (lang_output_section_statement_type): Add dup_output. * ldlang.c (lang_output_section_statement_lookup): Set dup_output. (init_os): Test dup_output rather than constraint. * testsuite/ld-scripts/pr27100.d, * testsuite/ld-scripts/pr27100.s, * testsuite/ld-scripts/pr27100.t: New test. * testsuite/ld-scripts/data.exp: Run it. Don't exclude aout here. * testsuite/ld-scripts/data.d: Do so here instead. * testsuite/ld-scripts/fill.d: Likewise. * testsuite/ld-scripts/fill16.d: Likewise. Fixed, I believe. i can confirm its fixed with your diff i recompiled binutils and the kernel successfully |