[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/19421] [2.26 Regression] Missing weak symbols in kernel mo
From: |
amodra at gmail dot com |
Subject: |
[Bug binutils/19421] [2.26 Regression] Missing weak symbols in kernel modules on powerpc64le-linux-gnu |
Date: |
Tue, 12 Jan 2016 04:15:32 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19421
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at sourceware dot org |amodra at gmail dot com
--- Comment #3 from Alan Modra <amodra at gmail dot com> ---
So far, I haven't been able to reproduce this problem using torvalds linux git
kernel and current binutils.
There are lots of claims in the debian bug report:
1)
fat: no symbol version for TOC.
fat: Unknown symbol TOC. (err -22)
ext4: no symbol version for TOC.
ext4: Unknown symbol TOC. (err -22)
and others like this.
This can happen if there is no entry for "TOC." in the __versions section of a
module, but I see for example
objdump -sj__versions fs/binfmt_misc.ko
...
0e00 00000000 00000000 2e544f43 2e000000 .........TOC....
0e10 00000000 00000000 00000000 00000000 ................
0e20 00000000 00000000 00000000 00000000 ................
0e30 00000000 00000000 00000000 00000000 ................
...
I picked on binfmt_misc.ko rather than the fat or ext4 modules since
binfmt_misc.ko is built for "make defconfig", but I see the same with ext4.ko
after flipping the appropriate .config lines.
2)
Changed section ordering for -z relro. This shouldn't be a problem, but may be
one of the triggers for (4) below.
3)
Normally a ppc64el kernel has the following undefined symbols:
| 44809: 0000000000000000 0 NOTYPE WEAK DEFAULT UND mach_powermac
| 52870: 0000000000000000 0 NOTYPE WEAK DEFAULT UND mach_chrp
| 62021: 0000000000000000 0 NOTYPE WEAK DEFAULT UND mach_cell
| 62383: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __crc_TOC.
Also not a problem if these symbols disappear when undefined, I think. The
mach_* symbols are used in the following macro
#define machine_is(name) \
({ \
extern struct machdep_calls mach_##name \
__attribute__((weak)); \
machine_id == &mach_##name; \
})
A missing kernel symbol will be silently resolved to 0 if the reference is
STB_WEAK as far as I can see from my reading kernel/module.c. This of course
is the same value if the symbol is found. __crc_TOC. is similar (but I'm still
investigating this one).
4)
the mcount symbol error
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68759
If you're building with gcc-6, you will need a kernel patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/19421] [2.26 Regression] Missing weak symbols in kernel modules on powerpc64le-linux-gnu, doko at debian dot org, 2016/01/05
- [Bug binutils/19421] [2.26 Regression] Missing weak symbols in kernel modules on powerpc64le-linux-gnu, nickc at redhat dot com, 2016/01/08
- [Bug binutils/19421] [2.26 Regression] Missing weak symbols in kernel modules on powerpc64le-linux-gnu,
amodra at gmail dot com <=
- [Bug binutils/19421] [2.26 Regression] Missing weak symbols in kernel modules on powerpc64le-linux-gnu, amodra at gmail dot com, 2016/01/12
- [Bug binutils/19421] [2.26 Regression] Missing weak symbols in kernel modules on powerpc64le-linux-gnu, amodra at gmail dot com, 2016/01/12
- [Bug binutils/19421] [2.26 Regression] Missing weak symbols in kernel modules on powerpc64le-linux-gnu, cvs-commit at gcc dot gnu.org, 2016/01/14
- [Bug binutils/19421] [2.26 Regression] Missing weak symbols in kernel modules on powerpc64le-linux-gnu, amodra at gmail dot com, 2016/01/14
- [Bug binutils/19421] [2.26 Regression] Missing weak symbols in kernel modules on powerpc64le-linux-gnu, markus at trippelsdorf dot de, 2016/01/14