------- Comment From manjunath.ma...@ibm.com 2022-09-29 10:33 EDT------- The issue was reproduced on Ubuntu 22.04
---uname output--- Linux 5.15.0-48-generic #54-Ubuntu SMP Fri Aug 26 13:27:34 UTC 2022 ppc64le ppc64le ppc64le GNU/Linux ?Steps to recreate --- install the following packages dpkg -i libbinutils_2.38-3ubuntu1_ppc64el.deb dpkg -i binutils-common_2.38-3ubuntu1_ppc64el.deb dpkg -i binutils-powerpc64le-linux-gnu_2.38-3ubuntu1_ppc64el.deb Clone the glibc repository and build glibc. git clone git://sourceware.org/git/glibc.git git reset ?hard 2d5ec6692f5746ccb11db60976a6481ef8e9d74f mkdir build && cd build ../glibc/configure ?prefix=$HOME/prefix && make -j8 && make check ---Error Message--- Generating locale C.UTF-8: this might take a while... Segmentation fault Charmap: "UTF-8" Inputfile: "C" Outputdir: "C.UTF-8" failed ---Fix--- The latest binutils package on Ubuntu 22.04 has the above mentioned fix included, so updating to the below mentioned packages resolved the issue. binutils-powerpc64le-linux-gnu_2.38-4ubuntu2_ppc64el.deb libbinutils_2.38-4ubuntu2_ppc64el.deb binutils-common_2.38-4ubuntu2_ppc64el.deb -- 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/1978129 Title: Incomplete support for DT_RELR relocations on Ubuntu 22.04 Status in The Ubuntu-power-systems project: Fix Committed Status in binutils package in Ubuntu: Fix Released Status in binutils source package in Jammy: Fix Committed Status in binutils source package in Kinetic: Fix Released Bug description: SRU Justification: ================== [Impact] * The latest glibc uses DT_RELR relocations, but it turned out that the linker support is still incomplete, as of binutils-2.38-3ubuntu1 on Ubuntu 22.04. * It lacks the fix/commit 'PowerPC64 DT_RELR relative reloc addresses'. * As discussed at the binutils mailing list: https://sourceware.org/pipermail/binutils/2022-March/119921.html this fixes several (glibc) regressions (from 574 to 17). * Instead of stashing r_offset final address calculations in ppc64_elf_size_stubs for use by ppc64_elf_build_stubs, section/offset pairs need to be kept. [Test Plan] * Build and run the official (make) check: git clone git://sourceware.org/git/glibc.git mkdir build && cd build ../glibc/configure --prefix=/usr && make -j8 && make check [Where problems could occur] * In case relr_addr is not replaced everywhere it's deletion in elf64-ppc.c can cause problems, which will mainly occur at build time. * The relr section/offset array may lead to problems if the array is not properly handled or used. * The rewrite of append_relr_off may cause issues due to wrong allocs erroneous pointer arithmetic or array handling. * The entirely new sort_relr function may introduce new code issues or performance issues. * The adjustments of ppc64_elf_size_stubs and ppc64_elf_build_stubs to the new relr code could be done wrong in which case the linker support is still not working. * But the patch was discussed at the upstream mailing list: https://sourceware.org/pipermail/binutils/2022-March/thread.html#119921 * and is limited to ppc, and even to file 'elf64-ppc.c'. __________ == Comment: #0 - Matheus Salgueiro Castanho <mscasta...@ibm.com> - 2022-06-09 09:32:29 == ---Problem Description--- Latest glibc uses DT_RELR relocations, but linker support is incomplete as of binutils-2.38-3ubuntu1 on Ubuntu 22.04. It lacks the following fix integrated into the upstream 2.38 branch: PowerPC64 DT_RELR relative reloc addresses https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=e4a35c7319628045302d4c597cb27f1b0a08c858 As mentioned in the binutils mailing list when this patch was discussed, this fixes several glibc regressions: https://sourceware.org/pipermail/binutils/2022-March/119921.html Contact Information = Matheus Castanho/mscasta...@ibm.com ---uname output--- N/A Machine Type = N/A ---Debugger--- A debugger is not configured ---Steps to Reproduce--- git clone git://sourceware.org/git/glibc.git mkdir build && cd build ../glibc/configure --prefix=/usr && make -j8 && make check Userspace tool common name: binutils The userspace tool has the following bit modes: 64-bit Userspace rpm: binutils Userspace tool obtained from project website: na *Additional Instructions for Matheus Castanho/mscasta...@ibm.com: -Attach ltrace and strace of userspace application. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-power-systems/+bug/1978129/+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