Go to file
Donald Dutile b893fedab2 modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24}
JIRA: https://issues.redhat.com/browse/RHEL-28063

commit 56a24b8ce6a7f9c4a21b2276a8644f6f3d8fc14d
Author: Masahiro Yamada <masahiroy@kernel.org>
Date:   Thu Jun 1 21:09:56 2023 +0900

    modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24}

    addend_arm_rel() processes R_ARM_PC24, R_ARM_CALL, R_ARM_JUMP24 in a
    wrong way.

    Here, test code.

    [test code for R_ARM_JUMP24]

      .section .init.text,"ax"
      bar:
              bx      lr

      .section .text,"ax"
      .globl foo
      foo:
              b       bar

    [test code for R_ARM_CALL]

      .section .init.text,"ax"
      bar:
              bx      lr

      .section .text,"ax"
      .globl foo
      foo:
              push    {lr}
              bl      bar
              pop     {pc}

    If you compile it with ARM multi_v7_defconfig, modpost will show the
    symbol name, (unknown).

      WARNING: modpost: vmlinux.o: section mismatch in reference: foo (section: .text) -> (unknown) (section: .init.text)

    (You need to use GNU linker instead of LLD to reproduce it.)

    Fix the code to make modpost show the correct symbol name.

    I imported (with adjustment) sign_extend32() from include/linux/bitops.h.

    The '+8' is the compensation for pc-relative instruction. It is
    documented in "ELF for the Arm Architecture" [1].

      "If the relocation is pc-relative then compensation for the PC bias
      (the PC value is 8 bytes ahead of the executing instruction in Arm
      state and 4 bytes in Thumb state) must be encoded in the relocation
      by the object producer."

    [1]: https://github.com/ARM-software/abi-aa/blob/main/aaelf32/aaelf32.rst

    Fixes: 56a974fa2d ("kbuild: make better section mismatch reports on arm")
    Fixes: 6e2e340b59 ("ARM: 7324/1: modpost: Fix section warnings for ARM for many compilers")
    Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Signed-off-by: Donald Dutile <ddutile@redhat.com>
2024-06-17 14:17:27 -04:00
Documentation module: add debugging auto-load duplicate module support 2024-06-17 14:17:26 -04:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
arch ARM: dyndbg: allow including dyndbg.h in decompressor 2024-06-17 14:17:23 -04:00
block blk-cgroup: Properly propagate the iostat update up the hierarchy 2024-06-07 09:11:13 +08:00
certs integrity: PowerVM support for loading third party code signing keys 2024-02-05 19:05:32 +08:00
crypto crypto: pcrypt - Fix hungtask for PADATA_RESET 2024-05-29 13:20:49 +08:00
drivers dyndbg: cleanup dynamic usage in ib_srp.c 2024-06-17 14:17:23 -04:00
fs Merge: gfs2: Fix glock shrinker 2024-06-12 13:28:35 +00:00
include kallsyms: remove unsed API lookup_symbol_attrs 2024-06-17 14:17:26 -04:00
init kallsyms: Add self-test facility 2024-06-17 14:17:22 -04:00
io_uring use less confusing names for iov_iter direction initializers 2024-05-15 13:56:26 +08:00
ipc Merge: ipc/msg: mitigate the lock contention in ipc/msg 2024-05-16 13:29:40 +00:00
kernel module/decompress: Fix error checking on zstd decompression 2024-06-17 14:17:27 -04:00
lib dyndbg: cleanup dynamic usage in ib_srp.c 2024-06-17 14:17:23 -04:00
mm Merge: mm/hugetlb: fix missing hugetlb_lock for resv uncharge 2024-06-12 13:32:08 +00:00
net net/smc: avoid data corruption caused by decline 2024-06-13 10:02:17 +00:00
redhat module: add debug stats to help identify memory pressure 2024-06-17 14:17:25 -04:00
samples kmemleak-test: fix kmemleak_test.c build logic 2024-04-30 07:00:50 -04:00
scripts modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24} 2024-06-17 14:17:27 -04:00
security Merge: mm: update to 6.3 2024-05-13 12:46:48 +00:00
sound Merge DRM changes from upstream v6.7..v6.8 2024-06-11 06:44:18 +10:00
tools kallsyms: increase maximum kernel symbol length to 512 2024-06-17 14:17:21 -04:00
usr kexec.h: add linux/kexec.h to UAPI compile-test coverage 2024-05-15 13:58:51 +08:00
virt KVM: Drop unused @may_block param from gfn_to_pfn_cache_invalidate_start() 2024-05-13 23:58:51 -04:00
.clang-format printk: Prepare for SRCU console list protection 2024-05-09 11:25:16 -04:00
.cocciconfig
.get_maintainer.ignore
.gitattributes gitattributes: Remove unnecesary export restrictions 2021-08-30 10:50:35 -04:00
.gitignore redhat: rhdocs: delete .get_maintainer.conf 2024-06-06 09:36:57 -04:00
.gitlab-ci.yml gitlab-ci: allow coverage template to disable debug builds again 2024-04-09 14:39:33 +02:00
.mailmap mailmap: remove my redhat.com address from RHEL9's .mailmap file 2022-09-26 09:34:38 -04:00
COPYING
CREDITS MAINTAINERS: Drop Gustavo Pimentel as PCI DWC Maintainer 2024-05-13 15:56:48 -06:00
Kbuild
Kconfig Introduce CONFIG_RH_DISABLE_DEPRECATED 2021-08-30 10:50:55 -04:00
Kconfig.redhat redhat: kABI: add missing RH_KABI_SIZE_ALIGN_CHECKS Kconfig option 2024-01-12 14:27:16 +01:00
MAINTAINERS module: Move kdb module related code out of main kdb code 2024-06-17 14:17:13 -04:00
Makefile Merge DRM changes from upstream v6.8..v6.9 2024-06-11 06:44:19 +10:00
Makefile.rhelver [redhat] kernel-5.14.0-464.el9 2024-06-13 13:20:10 +00:00
README
makefile redhat: Change Makefile target names to dist- 2021-08-30 10:50:11 -04: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.