Re: [PATCH v2] crypto: arm64/poly1305 - move data to rodata section

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06.08.24 14:55, Daniel Gomez wrote:
> On Tue, Aug 06, 2024 at 05:54:44AM GMT, Jia He wrote:
>> When objtool gains support for ARM in the future, it may encounter issues
>> disassembling the following data in the .text section:
>>> .Lzeros:
>>> .long   0,0,0,0,0,0,0,0
>>> .asciz  "Poly1305 for ARMv8, CRYPTOGAMS by \@dot-asm"
>>> .align  2
>>
>> Move it to .rodata which is a more appropriate section for read-only data.
>>
>> There is a limit on how far the label can be from the instruction, hence
>> use "adrp" and low 12bits offset of the label to avoid the compilation
>> error.
> [...]
> 
> I'm getting the following error with next-20240806
> 
> make LLVM=1 ARCH=arm64 allyesconfig
> make LLVM=1 ARCH=arm64 -j$(nproc)
> 
> ld.lld: error: vmlinux.a(arch/arm64/crypto/poly1305-core.o):(function poly1305_blocks_neon: .text+0x3d4): relocation R_AARCH64_ADR_PREL_LO21 out of range: 269166444 is not in [-1048576, 1048575]

Hmmm, I ran into build problems with -next today for arm64 and x86-64
(ppc64le failed at a later stage for a different reason) on all current
Fedora releases (yesterday everything worked fine). The error looks
different, but mentions R_AARCH64_ADR_PREL_LO21 as well on arm64.

/usr/bin/ld: /tmp/ccgC3toO.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `stderr@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /tmp/ccgC3toO.o(.text+0x8): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17'
/usr/bin/ld: final link failed: bad value

That's what brought be here, so allow me to ask: might that be related
somehow or is that likely a different problem?

arm64: https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-39-aarch64/07889669-next-next-all/builder-live.log.gz
"""
> + /usr/bin/make -s 'HOSTCFLAGS=-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection   ' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' ARCH=arm64 'KCFLAGS= ' WITH_GCOV=0 -j4 vmlinuz.efi
> /usr/bin/ld: /tmp/ccgC3toO.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `stderr@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/bin/ld: /tmp/ccgC3toO.o(.text+0x8): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17'
> /usr/bin/ld: final link failed: bad value
> collect2: error: ld returned 1 exit status
> make[4]: *** [Makefile:47: /builddir/build/BUILD/kernel-next-20240808/linux-6.11.0-0.0.next.20240808.225.vanilla.fc39.aarch64/tools/bpf/resolve_btfids/fixdep] Error 1
> make[3]: *** [/builddir/build/BUILD/kernel-next-20240808/linux-6.11.0-0.0.next.20240808.225.vanilla.fc39.aarch64/tools/build/Makefile.include:15: fixdep] Error 2
> make[2]: *** [Makefile:76: bpf/resolve_btfids] Error 2
> make[1]: *** [/builddir/build/BUILD/kernel-next-20240808/linux-6.11.0-0.0.next.20240808.225.vanilla.fc39.aarch64/Makefile:1362: tools/bpf/resolve_btfids] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Makefile:226: __sub-make] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.iEcjn7 (%build)
"""

x86_64
https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-39-x86_64/07889669-next-next-all/builder-live.log.gz
"""
> + /usr/bin/make -s 'HOSTCFLAGS=-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection   ' 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' ARCH=x86_64 'KCFLAGS= ' WITH_GCOV=0 -j2 bzImage
> /usr/bin/ld: /tmp/ccSPE2cG.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
> /usr/bin/ld: failed to set dynamic section sizes: bad value
> collect2: error: ld returned 1 exit status
> make[4]: *** [Makefile:47: /builddir/build/BUILD/kernel-next-20240808/linux-6.11.0-0.0.next.20240808.225.vanilla.fc39.x86_64/tools/objtool/fixdep] Error 1
> make[3]: *** [/builddir/build/BUILD/kernel-next-20240808/linux-6.11.0-0.0.next.20240808.225.vanilla.fc39.x86_64/tools/build/Makefile.include:15: fixdep] Error 2
> make[2]: *** [Makefile:73: objtool] Error 2
> make[1]: *** [/builddir/build/BUILD/kernel-next-20240808/linux-6.11.0-0.0.next.20240808.225.vanilla.fc39.x86_64/Makefile:1362: tools/objtool] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Makefile:226: __sub-make] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.MPS2x4 (%build)
"""

Ciao, Thorsten




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux