Go to file
Josh Poimboeuf 553fe231cd objtool: Support Clang non-section symbols in ORC generation
BugLink: https://bugs.launchpad.net/bugs/1904445

commit e81e072443 upstream.

When compiling the kernel with AS=clang, objtool produces a lot of
warnings:

  warning: objtool: missing symbol for section .text
  warning: objtool: missing symbol for section .init.text
  warning: objtool: missing symbol for section .ref.text

It then fails to generate the ORC table.

The problem is that objtool assumes text section symbols always exist.
But the Clang assembler is aggressive about removing them.

When generating relocations for the ORC table, objtool always tries to
reference instructions by their section symbol offset.  If the section
symbol doesn't exist, it bails.

Do a fallback: when a section symbol isn't available, reference a
function symbol instead.

Reported-by: Dmitry Golovin <dima@golovin.in>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/669
Link: https://lkml.kernel.org/r/9a9cae7fcf628843aabe5a086b1a3c5bf50f42e8.1585761021.git.jpoimboe@redhat.com
Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: William Breathitt Gray <william.gray@canonical.com>
2020-12-10 12:02:24 +01:00
Documentation powerpc/64s: flush L1D after user accesses 2020-11-23 13:44:06 -03:00
LICENSES LICENSES: Rename other to deprecated 2019-05-03 06:34:32 -06:00
arch s390/pci: fix hot-plug of PCI function missing bus 2020-12-10 12:02:23 +01:00
block block: ratelimit handle_bad_sector() message 2020-11-09 14:49:08 +01:00
certs certs: Add wrapper function to check blacklisted binary hash 2020-04-06 13:47:55 -05:00
crypto crypto: algif_skcipher - EBUSY on aio should be an error 2020-11-09 14:48:36 +01:00
debian UBUNTU: update dkms package versions 2020-12-09 02:04:16 -05:00
debian.master UBUNTU: Ubuntu-5.4.0-58.64 2020-12-09 02:51:40 -05:00
drivers Revert "md: add md_submit_discard_bio() for submitting discard bio" 2020-12-09 02:04:16 -05:00
fs btrfs: tree-checker: fix incorrect printk format 2020-12-10 12:02:23 +01:00
include netfilter: nftables_offload: KASAN slab-out-of-bounds Read in nft_flow_rule_create 2020-12-10 12:02:24 +01:00
init kprobes: tracing/kprobes: Fix to kill kprobes on initmem after boot 2020-11-09 14:48:03 +01:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2020-06-22 17:21:43 -03:00
kernel perf/core: Fix race in the perf_mmap_close() function 2020-11-09 14:49:22 +01:00
lib lib/crc32.c: fix trivial typo in preprocessor condition 2020-11-09 14:49:00 +01:00
mm mm/page_owner: change split_page_owner to take a count 2020-11-09 14:49:00 +01:00
net socket: don't clear SOCK_TSTAMP_NEW when SO_TIMESTAMPNS is disabled 2020-12-10 12:02:24 +01:00
samples misc: vop: add round_up(x,4) for vring_size to avoid kernel panic 2020-11-09 14:49:12 +01:00
scripts scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting 2020-11-09 14:48:12 +01:00
security ima: Don't ignore errors from crypto_shash_update() 2020-11-09 14:48:35 +01:00
sound ALSA: hda/ca0132 - Add new quirk ID for SoundBlaster AE-7. 2020-11-09 14:49:17 +01:00
tools objtool: Support Clang non-section symbols in ORC generation 2020-12-10 12:02:24 +01:00
ubuntu UBUNTU: hio -- remove duplicated MODULE_DEVICE_TABLE declaration 2020-03-18 12:02:49 +01:00
usr initramfs: restore default compression behavior 2020-04-29 16:25:32 +02:00
virt KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch 2020-11-09 14:48:04 +01:00
.clang-format clang-format: Update with the latest for_each macro list 2019-08-31 10:00:51 +02:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes
.gitignore UBUNTU: [debian] Initial debian and ubuntu directories 2019-11-25 14:56:22 +01:00
.mailmap ARM: SoC fixes 2019-11-10 13:41:59 -08:00
COPYING
CREDITS MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer 2019-10-10 08:12:51 -07:00
Kbuild kbuild: do not descend to ./Kbuild when cleaning 2019-08-21 21:03:58 +09:00
Kconfig UBUNTU: [debian] Initial debian and ubuntu directories 2019-11-25 14:56:22 +01:00
MAINTAINERS Documentation/llvm: add documentation on building w/ Clang/LLVM 2020-09-16 05:13:26 -04:00
Makefile Linux 5.4.73 2020-11-09 14:49:20 +01:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
dropped.txt UBUNTU: [debian] Initial debian and ubuntu directories 2019-11-25 14:56:22 +01:00
snapcraft.yaml UBUNTU: [debian] Initial debian and ubuntu directories 2019-11-25 14:56:22 +01:00
update-version-dkms UBUNTU: [Packaging] Add BugLink to update-version-dkms commit 2020-03-20 17:27:55 -05:00

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.