ld: testsuite: Add sframe test for PR 33401

Claudiu Zissulescu Ianculescu claziss@gmail.com
Fri Jan 16 13:18:13 GMT 2026


On Fri, Jan 16, 2026 at 2:47 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 16.01.2026 13:15, Claudiu Zissulescu Ianculescu wrote:
> > On Fri, Jan 16, 2026 at 2:04 PM Jan Beulich <jbeulich@suse.com> wrote:
> >>
> >> On 16.01.2026 12:57, Claudiu Zissulescu Ianculescu wrote:
> >>> On Fri, Jan 16, 2026 at 1:42 PM Jan Beulich <jbeulich@suse.com> wrote:
> >>>>
> >>>> This fails for me with
> >>>>
> >>>> /build/binutils/master-git/2026-01-16/ld/.libs/ld-new: cannot find -lm: No such file or directory
> >>>> /build/binutils/master-git/2026-01-16/ld/.libs/ld-new: have you installed the static version of the m library ?
> >>>> /build/binutils/master-git/2026-01-16/ld/.libs/ld-new: cannot find -lgcc_s: No such file or directory
> >>>> /build/binutils/master-git/2026-01-16/ld/.libs/ld-new: have you installed the static version of the gcc_s library ?
> >>>> /build/binutils/master-git/2026-01-16/ld/.libs/ld-new: cannot find -lc: No such file or directory
> >>>> /build/binutils/master-git/2026-01-16/ld/.libs/ld-new: have you installed the static version of the c library ?
> >>>> /build/binutils/master-git/2026-01-16/ld/.libs/ld-new: cannot find -lgcc_s: No such file or directory
> >>>> /build/binutils/master-git/2026-01-16/ld/.libs/ld-new: have you installed the static version of the gcc_s library ?
> >>>> collect2: error: ld returned 1 exit status
> >>>
> >>> Please can you give me more context here.
> >>
> >> I would have provided more if I knew what else is needed. I assume my
> >> g++ is a little oldish, but tests should work regardless of compiler
> >> version (or they should make sure a minimum required version is
> >> present). My assumption is that newer g++ knows to imply -nostdlib
> >> when invoking relocatable links, but apparently my one doesn't.
> >
> > Probably you use custom CXXFLAGS/CFLAGS while testing.
>
> I don't, at least not knowingly. But as said, this part is easy to solve
> by adding -nostdlib. The other part, when the readelf output is actually
> checked, is what I'm in trouble with. The more that iirc Alan already
> said that there being no R_*_NONE might actually be a good thing. IOW I
> can't even tell why the test fails when there is that "No R_*_NONE in
> .rela.sframe" early return path, which - as said - isn't taken in my case.
> There's a very wild guess of mine that the polarity of the check there
> might be inverted, yet then you surely would have noticed that?


To test the PR33401 issue, I need to make sure there is a R_*_NONE in
the sframe from the first link.
What I can do is either use run_cc_link_test with an empty WARNING
action, and later on to customise
the check if there is any R_*_NONE in sframe, or to have a custom
compilation & checking part added
to sframe.exp. I'll try the first one, let's see if it is sufficient.

For the PR32789, I'll add -nostdlib as you suggested.

//Claudiu


More information about the Binutils mailing list