Don't invent names for STT_SECTION symbols.
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 17:50:17 PDT 2016
On Mon, Mar 14, 2016 at 02:53:33PM -0700, Rafael EspĂndola via llvm-commits wrote:
> On 12 March 2016 at 12:33, George Rimar <grimar at accesssoftek.com> wrote:
> >> We should just copy the symbol names with -r.
> >> ...
> >>- // That can happen if creating relocatable output.
> >>- if (Sym.getType() == STT_SECTION)
> >>- SymName = Section->getSectionName();
> >
> > Why not ?
>
> Because we don't need to. If the producer wants to give a section
> symbol a name, it can do it and we will keep it. If whatever produced
> the .o decided to not name it, it is not the linker's job to change
> that decision.
In fact, can't a tool like nm always synthesize the name from the
section table anyway?
Joerg
More information about the llvm-commits
mailing list