Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260615174130.GP3520958@port70.net>
Date: Mon, 15 Jun 2026 19:41:30 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com, devel@...ibc-ng.org
Subject: Re: sh fdpic gcc-15 regression

* Rich Felker <dalias@...c.org> [2026-06-15 10:58:42 -0400]:
> On Mon, Jun 15, 2026 at 03:17:30PM +0200, Szabolcs Nagy wrote:
> > gcc-15 added fdpic support in libbacktrace (for the xtensa fdpic port)
> > https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=c6803cdaba7a7bf933e52cd36f901430253cc2b0
> > https://inbox.sourceware.org/gcc-patches/20240527065026.855607-1-jcmvbkbc@gmail.com/
> > 
> > this broke the gcc build for sh2eb-linux-muslfdpic because it assumes
> > link.h defines __RELOC_POINTER and elf32_fdpic_loadaddr (ugly api..).
> > 
> > the easy fix is to disable the new fdpic code for __SH_FDPIC__.
> > 
> > but i wonder if there is and actual abi issue in musl because those
> > defs are used in uclibc fdpic targets (frv, bfin, arm, xtensa) for
> > the dl_iterate_phdr api (used by libgcc for unwinding). is this api
> > broken on muslfdpic i.e. did the unwinder ever work?
> > 
> > https://github.com/wbx-github/uclibc-ng/blob/master/include/link.h#L185
> > https://github.com/wbx-github/uclibc-ng/blob/master/libc/sysdeps/linux/xtensa/bits/elf-fdpic.h
> > 
> > (i'm not running anything on sh2, just testing mcm builds)
> 
> I'm pretty sure C++ exceptions were tested on j2, but I'm not 100%
> sure the path that goes through dl_iterate_phdr was tested.

hm i guess if code segment (with phdr and ro data) is the
first load segment then normal address computation works
(dso->base + dso_vaddr == ptr) for code, phdr and eh_frame
pointers, which is all you need for unwinding.

so i guess the fancy abi is only needed for unusual elfs.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.