Yes, I wondered why the build doesn't fail. Seems odd.
On 24 jan. 2016, at 03:35, Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
On 01/23/2016 06:06 PM, Guenter Roeck wrote:
Hi,
I see runtime problems with the current mmotm branch. All qemu mips targets
(32 and 64 bit, big and little endian) are stuck in boot after this commit.
Bisect points to commit d13682e4d9d2 ("kallsyms: add support for relative offsets
in kallsyms address table". Disabling CONFIG_KALLSYMS_BASE_RELATIVE fixes the problem,
ie I can boot the image with qemu.
Bisect log is attached.
Playing with the problem, I found the following:
1) The problem is only seen with a toolchain using binutils 2.22, but not
with a toolchain using binutils 2.25. The compiler configuration may be
different for both toolchains.
2) Message "kallsyms failure: absolute symbol value 0xffffffff807afd14 out of range
in relative mode" (twice) when using the toolchain with binutils 2.22.
This does not cause the build to fail, though.
3) kallsyms_sym_address() parameter variable type is "int". In the calling code,
the variable type used is "unsigned long". That has no impact on the problem,
though.
An additional data point: When using the older toolchain, many symbols in System.map
are marked "A".
ffffffff80100000 A _text
With the more recent toolchain, the same symbols are marked "T".
ffffffff80100000 T _text
Thanks for the analysis. It is surprising that the build does not fail when this occurs, and the subsequent hangs themselves are probably caused by missing kallsyms data.
scripts/kallsyms.c ignores all A symbols except _text, which is actually a relative symbol by nature so we can simply assume it is relative (i.e., override it as T)
Re x86_64 !SMP, any build time errors there as well? Likewise for sparc32?
Thanks again, and sorry for the trouble,