[PATCH 1/4] elf: Disallow the empty symbol name
H.J. Lu
hjl.tools@gmail.com
Tue Sep 23 20:21:33 GMT 2025
On Tue, Sep 23, 2025 at 10:34 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 23.09.2025 13:20, Alan Modra wrote:
> > On Tue, Sep 23, 2025 at 10:15:51AM +0800, H.J. Lu wrote:
> >> Reject the empty symbol name, "".
> >>
> >> PR ld/33456
> >> * elflink.c (elf_link_add_object_symbols): Disallow the empty
> >> symbol name.
> >
> > OK.
>
> Where exactly is it stated that zero-length symbols aren't allowed?
> gas allows me to make such a symbol. It isn't consistent though: It
> doesn't allow me to make such a symbol global, for example. Imo as
> long as such symbols aren't forbidden, this should be at most a
> warning.
>
> Jan
name here is a global symbol, which can't be an empty string.
I will update my commit message with
elf: Disallow the empty global symbol name
Reject the empty global symbol name, "".
PR ld/33456
* elflink.c (elf_link_add_object_symbols): Disallow the empty
global symbol name.
--
H.J.
More information about the Binutils
mailing list