Bug #6098

ld(1) should not require symbols which identify group sections be global

Added by Rich Lowe over 5 years ago. Updated over 5 years ago.

tools - gate/build tools
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


It seems to me entirely valid that the symbol which identify SHF_GROUP sections via .sh_info should be local (or whatever else). The only specifications in the gABI regarding globalness relate to referencing the group, not the group identifying itself.

The check refusing STB_LOCAL should be removed.

Possibly additionally the check forbidding the signature symbol be defined should also be removed, I don't see why it must be defined, but I'm less certain of the implications of fixing that.


Updated by Rich Lowe over 5 years ago is a diff of the conservative fix for the issue as encountered by Igor.


Updated by Rich Lowe over 5 years ago

In fact, the gABI specifically states, here:

"The referenced signature symbol is not restricted. Its containing symbol table section need not be a member of the group, for example."

Which could easily be read to suggest that the SHN_UNDEF check is also invalid, as suspected (you'll note that the checks implemented closely, but not precisely, reflect those described for references from outside the group for comdat groups).

I think all the checks for signature symbol validity are bogus, beyond the basic checks already performed (that the sh_link/sh_info fields actually are valid in a more general sense)


Updated by Electric Monk over 5 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 50 to 100

git commit 359db861fd14071f8a25831efe3bf3790980d071

commit  359db861fd14071f8a25831efe3bf3790980d071
Author: Richard Lowe <>
Date:   2015-08-17T15:54:32.000Z

    6098 ld(1) should not require symbols which identify group sections be global
    Reviewed by: Igor Kozhukhov <>
    Reviewed by: Dan McDonald <>
    Reviewed by: Gordon Ross <>
    Approved by: Robert Mustacchi <>

Also available in: Atom PDF