svn commit: r273334 - in head/sys: boot/common kern sys
Marcel Moolenaar
marcel at xcllnt.net
Mon Oct 20 18:39:21 UTC 2014
> On Oct 20, 2014, at 11:00 AM, Roman Divacky <rdivacky at vlakno.cz> wrote:
>
>> Note that LLVM appends the priority of the constructors to the name of
>> the .ctors section. Not so when compiling with GCC. The code currently
>> works for GCC and not for LLVM.
>
> Uhm? LLVM here creates ".ctors" section, nothing is appended. Can you be more
> specific on what you're seing?
Go to a module build directory (I picked uart) and build on amd64:
% make DEBUG_FLAGS="-ftest-coverage -fprofile-arcs"
Check with objdump:
% objdump -x /usr/obj/usr/src/sys/modules/uart/uart.ko | grep ctors
16 .ctors.65535 00000080 0000000000000000 0000000000000000 00020320 2**3
0000000000000000 l d .ctors.65535 0000000000000000 .ctors.65535
RELOCATION RECORDS FOR [.ctors.65535]:
As you can see, the section is not called .ctors, but it's called
.ctors.$((65536-priority)).
The priority suffix is removed as part of linking, but on amd64,
kernel modules are relocatables...
FYI,
--
Marcel Moolenaar
marcel at xcllnt.net
More information about the svn-src-all
mailing list