This is due to a horrible linker script breaking a new GOT indirect to
GOT relative optimisation (git commit 066f4018ae78).

ld does a preliminary layout to see whether various optimisations can be
done.  In this case the preliminary layout indicates that code using a
GOT indirect address can be replaced with code calculating a GOT
relative address (saving a GOT entry and load from memory).  The trouble
is that skiboot.lds puts a bunch of dynamic sections between .got and
the address in question.  Those dynamic sections are not filled out for
the preliminary layout, nor can they be since one of the aims of the
ppc64 linker optimisation is to reduce dynamic relocations.  With the
dynamic sections adding over 150kb, the optimisation is no longer valid
but ld has already removed the GOT entry.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to binutils in Ubuntu.
https://bugs.launchpad.net/bugs/1833237

Title:
  skiboot ftbfs in eoan

Status in binutils:
  In Progress
Status in binutils package in Ubuntu:
  Confirmed
Status in skiboot package in Ubuntu:
  Confirmed

Bug description:
  skiboot ftbfs in eoan

  https://launchpad.net/ubuntu/+archive/test-
  rebuild-20190614/+build/17038512/+files/buildlog_ubuntu-eoan-
  amd64.skiboot_6.2-1_BUILDING.txt.gz

  powerpc64-linux-gnu-gcc        -I/<<PKGBUILDDIR>>/include -Iinclude -MMD 
-include /<<PKGBUILDDIR>>/include/config.h -I/<<PKGBUILDDIR>>/libfdt 
-I/<<PKGBUILDDIR>>/libflash -I/<<PKGBUILDDIR>>/libxz 
-I/<<PKGBUILDDIR>>/libc/include -I/<<PKGBUILDDIR>> -I/<<PKGBUILDDIR>>/libpore 
-D__SKIBOOT__ -nostdinc -isystem 
/usr/lib/gcc-cross/powerpc64-linux-gnu/8/include -DBITS_PER_LONG=64 
-DHAVE_BIG_ENDIAN -ffreestanding -DHAS_STACK_PROT -D__ASSEMBLY__ -mbig-endian 
-m64 -mabi=elfv1  -c asm/dummy_map.S -o asm/dummy_map.o
  powerpc64-linux-gnu-gcc -I/<<PKGBUILDDIR>>/include -Iinclude -MMD -include 
/<<PKGBUILDDIR>>/include/config.h -I/<<PKGBUILDDIR>>/libfdt 
-I/<<PKGBUILDDIR>>/libflash -I/<<PKGBUILDDIR>>/libxz 
-I/<<PKGBUILDDIR>>/libc/include -I/<<PKGBUILDDIR>> -I/<<PKGBUILDDIR>>/libpore 
-D__SKIBOOT__ -nostdinc -isystem 
/usr/lib/gcc-cross/powerpc64-linux-gnu/8/include -DBITS_PER_LONG=64 
-DHAVE_BIG_ENDIAN -ffreestanding -DHAS_STACK_PROT -P -E skiboot.lds.S -o 
skiboot.lds
  powerpc64-linux-gnu-ld -EB -m elf64ppc --no-multi-toc -N --build-id=none 
--whole-archive -static -nostdlib -pie -Ttext-segment=0x0 
--oformat=elf64-powerpc -o skiboot.tmp.elf -T skiboot.lds skiboot.tmp.a 
asm/dummy_map.o
  powerpc64-linux-gnu-ld: BFD (GNU Binutils for Ubuntu) 2.32.51.20190614 
internal error, aborting at ../../bfd/elf64-ppc.c:15381 in 
ppc64_elf_relocate_section

  powerpc64-linux-gnu-ld: Please report this bug.

  make[2]: *** [/<<PKGBUILDDIR>>/Makefile.main:262: skiboot.tmp.elf] Error 1
  make[2]: Leaving directory '/<<PKGBUILDDIR>>'
  make[1]: *** [debian/rules:19: override_dh_auto_build-indep] Error 2

To manage notifications about this bug go to:
https://bugs.launchpad.net/binutils/+bug/1833237/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to