Bug 27073 - s390 linker fails with "bad value" when building kernel
Summary: s390 linker fails with "bad value" when building kernel
Status: RESOLVED DUPLICATE of bug 27100
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.36
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-15 17:33 UTC by Nick Clifton
Modified: 2021-01-04 10:58 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clifton 2020-12-15 17:33:58 UTC
The s390 kernel is currently not building using the latest versions of the upstream tools.  The following is a reduced test case based upon this failure:

  % cat rod.s
	.section .rodata
	.dc.l 0x1234
	.dc.l 0x5678

   % s390-linux-gnu-as rod.s -o rod.exe
   
   % cat 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); } }

  % s390-linux-gnu-ld -r -o rod.exe rod.o -T tmp_main.ver
  s390-linux-gnu-ld: final link failed: bad value

Whilst the linker script is unusual, the test should pass, and indeed it does so for other architectures.
Comment 1 Alan Modra 2021-01-04 10:58:50 UTC
Fixed with commit de34d42812a0

*** This bug has been marked as a duplicate of bug 27100 ***