Hi, On 26/01/18 08:57, Aurelien Jarno wrote: >> The build was performed on eller.d.o. >> >> If you reassign to binutils, please set affects. >> >> I put [email protected] into X-Debbugs-Cc. During cross builds I was able to >> reproduce a very similar build failure for mips and armhf. A native >> build on amd64 seems unaffected. Thus I have included [email protected] as >> well. > > Note that the build also fails on i386 on the same files, but in a > different way: > > | FAILED: test-ipv4ll > | cc -o test-ipv4ll 'test-ipv4ll@exe/src_libsystemd-network_test-ipv4ll.c.o' > -flto -Wl,--no-undefined -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -pie > -Wl,--gc-sections -g -O2 -fdebug-prefix-map=/tmp/systemd-236=. > -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro > -Wl,--start-group src/shared/libsystemd-shared-236.so > src/libsystemd-network/libsystemd-network.a -Wl,--end-group > '-Wl,-rpath,$ORIGIN/src/shared' > -Wl,-rpath-link,/tmp/systemd-236/build-deb/src/shared > | /usr/bin/ld: /tmp/ccFNIZSq.ltrans0.ltrans.o(.text+0x99f): unresolvable > R_386_PLT32 relocation against symbol `__umoddi3' > | /usr/bin/ld: final link failed: Nonrepresentable section on output > | collect2: error: ld returned 1 exit status > > That might help debugging the issue as it is more understandable than > a simple assert.
Fairly minimal testcase which triggers both bugs:
test.c:
volatile unsigned long long a = 42;
volatile unsigned long long b = 1;
int main(void)
{
return (int) (a / b);
}
build with:
gcc -flto -O2 -c test.c
ar rcs libtest.a test.o
gcc -flto -Wl,--whole-archive libtest.a -Wl,--no-whole-archive
On mipsel:
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail
../../bfd/elflink.c:9757
collect2: error: ld returned 1 exit status
On i386:
/usr/bin/ld: /tmp/cc5ZOEfW.ltrans0.ltrans.o(.text.startup+0x3d): unresolvable
R_386_PLT32 relocation against symbol `__udivdi3'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
James
signature.asc
Description: OpenPGP digital signature

