mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
51962a9d43
gcc on aarch64 may emit synbols of type 'n' if the kernel is built with '-frecord-gcc-switches'. In most cases, those symbols are reported with nm as 000000000000000e n $d and with objdump as 0000000000000000 l d .GCC.command.line 0000000000000000 .GCC.command.line 000000000000000e l .GCC.command.line 0000000000000000 $d Those symbols are detected in is_arm_mapping_symbol() and ignored. However, if "--prefix-symbols=<prefix>" is configured as well, the situation is different. For example, in efi/libstub, arm64 images are built with '--prefix-alloc-sections=.init --prefix-symbols=__efistub_'. In combination with '-frecord-gcc-switches', the symbols are now reported by nm as: 000000000000000e n __efistub_$d and by objdump as: 0000000000000000 l d .GCC.command.line 0000000000000000 .GCC.command.line 000000000000000e l .GCC.command.line 0000000000000000 __efistub_$d Those symbols are no longer ignored and included in the base address calculation. This results in a base address of 000000000000000e, which in turn causes kallsyms to abort with kallsyms failure: relative symbol value 0xffffff900800a000 out of range in relative mode The problem is seen in little endian arm64 builds with CONFIG_EFI enabled and with '-frecord-gcc-switches' set in KCFLAGS. Explicitly ignore symbols of type 'n' since those are clearly debug symbols. Link: http://lkml.kernel.org/r/1507136063-3139-1-git-send-email-linux@roeck-us.net Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
---|---|---|
.. | ||
basic | ||
coccinelle | ||
dtc | ||
gcc-plugins | ||
gdb | ||
genksyms | ||
kconfig | ||
ksymoops | ||
mod | ||
package | ||
selinux | ||
tracing | ||
.gitignore | ||
adjust_autoksyms.sh | ||
asn1_compiler.c | ||
bloat-o-meter | ||
bootgraph.pl | ||
check_00index.sh | ||
check_extable.sh | ||
checkincludes.pl | ||
checkkconfigsymbols.py | ||
checkpatch.pl | ||
checkstack.pl | ||
checksyscalls.sh | ||
checkversion.pl | ||
cleanfile | ||
cleanpatch | ||
coccicheck | ||
config | ||
conmakehash.c | ||
const_structs.checkpatch | ||
decode_stacktrace.sh | ||
decodecode | ||
depmod.sh | ||
diffconfig | ||
export_report.pl | ||
extract-cert.c | ||
extract-ikconfig | ||
extract-module-sig.pl | ||
extract-sys-certs.pl | ||
extract-vmlinux | ||
extract_xc3028.pl | ||
faddr2line | ||
gcc-goto.sh | ||
gcc-ld | ||
gcc-plugin.sh | ||
gcc-version.sh | ||
gcc-x86_32-has-stack-protector.sh | ||
gcc-x86_64-has-stack-protector.sh | ||
gen_initramfs_list.sh | ||
get_dvb_firmware | ||
get_maintainer.pl | ||
gfp-translate | ||
headerdep.pl | ||
headers.sh | ||
headers_check.pl | ||
headers_install.sh | ||
insert-sys-cert.c | ||
kallsyms.c | ||
Kbuild.include | ||
kernel-doc | ||
ld-version.sh | ||
Lindent | ||
link-vmlinux.sh | ||
Makefile | ||
Makefile.asm-generic | ||
Makefile.build | ||
Makefile.clean | ||
Makefile.dtbinst | ||
Makefile.extrawarn | ||
Makefile.gcc-plugins | ||
Makefile.headersinst | ||
Makefile.help | ||
Makefile.host | ||
Makefile.kasan | ||
Makefile.lib | ||
Makefile.modbuiltin | ||
Makefile.modinst | ||
Makefile.modpost | ||
Makefile.modsign | ||
Makefile.ubsan | ||
makelst | ||
markup_oops.pl | ||
mkcompile_h | ||
mkmakefile | ||
mksysmap | ||
mkuboot.sh | ||
module-common.lds | ||
namespace.pl | ||
objdiff | ||
parse-maintainers.pl | ||
patch-kernel | ||
pnmtologo.c | ||
profile2linkerlist.pl | ||
prune-kernel | ||
recordmcount.c | ||
recordmcount.h | ||
recordmcount.pl | ||
setlocalversion | ||
show_delta | ||
sign-file.c | ||
sortextable.c | ||
sortextable.h | ||
spelling.txt | ||
sphinx-pre-install | ||
stackdelta | ||
stackusage | ||
tags.sh | ||
unifdef.c | ||
ver_linux | ||
xen-hypercalls.sh | ||
xz_wrap.sh |