linux/arch/x86/tools
H. Peter Anvin fd95281530 x86-32, relocs: Whitelist more symbols for ld bug workaround
As noted in checkin:

a3e854d95 x86, relocs: Workaround for binutils 2.22.52.0.1 section bug

ld version 2.22.52.0.[12] can incorrectly promote relative symbols to
absolute, if the output section they appear in is otherwise empty.

Since checkin:

6520fe55 x86, realmode: 16-bit real-mode code support for relocs tool

we actually check for this and error out rather than silently creating
a kernel which will malfunction if relocated.

Ingo found a configuration in which __start_builtin_fw triggered the
warning.

Go through the linker script sources and look for more symbols that
could plausibly get bogusly promoted to absolute, and add them to the
whitelist.

In general, if the following error triggers:

	Invalid absolute R_386_32 relocation: <symbol>

... then we should verify that <symbol> is really meant to be
relocated, and add it and any related symbols manually to the S_REL
regexp.

Please note that 6520fe55 does not introduce the error, only the check
for the error -- without 6520fe55 this version of ld will simply
produce a corrupt kernel if CONFIG_RELOCATABLE is set on x86-32.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: <stable@vger.kernel.org> v3.4
2012-05-23 14:02:34 -07:00
..
.gitignore x86, realmode: 16-bit real-mode code support for relocs tool 2012-05-18 19:49:40 -07:00
chkobjdump.awk x86: Fix objdump version check in chkobjdump.awk for different formats. 2009-12-18 09:26:56 -08:00
distill.awk x86: Show symbol name if insn decoder test failed 2009-11-17 07:16:50 +01:00
gen-insn-attr-x86.awk x86: Update instruction decoder to support new AVX formats 2011-12-05 14:53:21 +01:00
insn_sanity.c x86/tools: Add decoded instruction dump mode 2011-12-05 14:53:23 +01:00
Makefile x86, realmode: 16-bit real-mode code support for relocs tool 2012-05-18 19:49:40 -07:00
relocs.c x86-32, relocs: Whitelist more symbols for ld bug workaround 2012-05-23 14:02:34 -07:00
test_get_len.c x86: Remove trailing spaces in messages 2010-02-07 17:47:51 +01:00