This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: as: How to determine the section of symbols
On Tue, Jul 16, 2019 at 12:56:37PM +0200, Peter Zijlstra wrote:
> ../arch/x86/include/asm/jump_label.h: Assembler messages:
> ../arch/x86/include/asm/jump_label.h:37: Warning: .space repeat count is zero, ignored
> ../arch/x86/include/asm/jump_label.h:38: Warning: .space repeat count is zero, ignored
> ../arch/x86/include/asm/jump_label.h:37: Warning: .space repeat count is zero, ignored
> ../arch/x86/include/asm/jump_label.h:38: Warning: .space repeat count is zero, ignored
This one is another puzzle, it comes from:
arch/x86/kvm/vmx/vmx.o (which for some reason we cannot build directly,
and requires CONFIG_KVM_INTEL=y which is not part of x86_64-defconfig).
But I cannot quite figure out where/why.
$ readelf -a defconfig-build/arch/x86/kvm/vmx/vmx.o |
awk '/^Relocation section/ { p=0 }
/^Relocation section.*\.rela__jump_table/ { p=1; getline; getline }
{ if (!p) { next }
if ($0 ~ /^$/) { p=0; next }
A=$0; a=$5; getline;
B=$0; b=$5; getline;
if (a != b) { print A; print B; print $0; }
}'
000000000100 000200000002 R_X86_64_PC32 0000000000000000 .text + 670
000000000104 000800000002 R_X86_64_PC32 0000000000000000 .text.unlikely + 1b
000000000108 016100000018 R_X86_64_PC64 0000000000000000 enable_evmcs + 0
000000001940 000200000002 R_X86_64_PC32 0000000000000000 .text + b688
000000001944 000800000002 R_X86_64_PC32 0000000000000000 .text.unlikely + 991
000000001948 016100000018 R_X86_64_PC64 0000000000000000 enable_evmcs + 0
000000001950 000200000002 R_X86_64_PC32 0000000000000000 .text + b6a1
000000001954 000800000002 R_X86_64_PC32 0000000000000000 .text.unlikely + 26b
000000001958 016100000018 R_X86_64_PC64 0000000000000000 enable_evmcs + 0
Which is _3_ cross-section jump entries, but there's only 2 warnings.
It does go away with:
".nops (2*is_byte) + (5*is_long) \n\t"
though, and again, all 3 turn into nop5, even though this is UB.