https://sourceware.org/bugzilla/show_bug.cgi?id=33684

--- Comment #19 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Ali Bahrami from comment #18)
> I saw this in the patch just committed:
> 
> > x86 ELF linkers no longer generate unused section symbols.  But Solaris
> > symbol sort sections generated by Solaris linker use section symbols.
> > When objcopy removes section symbols, it corrupts Solaris symbol sort
> > sections.  Add section_symbol_used to bfd and set it when Solaris symbol
> > sort sections are used.  Keep section symbols if section_symbol_used is
> > set.
> 
> To be clear, the sort sections don't use section symbols.
> They hold symbol indexes of data and function symbols, sorted
> by name or by address. The problem is that removing the section
> symbols causes the symbol indexes to change, which invalidates
> the indexes in the sort sections.

I will update the commit message.

> But I don't think this should tied to sort sections. The
> patch I tested this morning simply preserved them if present,
> which does the right thing, while being more generally
> correct and future proof. Why not leave the decision about
> section symbols to the link-editor?

x86 binutils doesn't generate unused section symbols.  Unless they are
used in some way, we won't generate them even if the input has section
symbols.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to