On 10/6/20 7:34 PM, Ian Lance Taylor wrote:
On Tue, Oct 6, 2020 at 3:20 AM Martin Liška <mli...@suse.cz> wrote:
On 10/6/20 10:00 AM, Richard Biener wrote:
On Tue, Oct 6, 2020 at 9:01 AM Martin Liška <mli...@suse.cz> wrote:
On 10/5/20 6:34 PM, Ian Lance Taylor wrote:
On Mon, Oct 5, 2020 at 9:09 AM Martin Liška <mli...@suse.cz> wrote:
The previous patch was not correct. This one should be.
Ready for master?
I don't understand why this code uses symtab_indices_shndx at all.
There should only be one SHT_SYMTAB_SHNDX section. There shouldn't be
any need for the symtab_indices_shndx vector.
Well, the question is if we can have multiple .symtab sections in one ELF
file? Theoretically yes, so we should also handle SHT_SYMTAB_SHNDX sections.
Note that the original usage of the SHT_SYMTAB_SHNDX section was motivated
by PR81968 which is about Solaris ld.
It wasn't my code but I suppose this way the implementation was
"easiest". There
should be exactly one symtab / shndx section. Rainer authored this support.
If we expect at maximum one SHT_SYMTAB_SHNDX section section, then I'm
suggesting
an updated version of the patch. It's what Ian offered.
This is OK with me with one minor change.
+ return "Multiple SYMTAB SECTION INDICES sections";
I think simply "More than one SHT_SYMTAB_SHNDX section". SYMTAB
SECTION INDICES doesn't mean anything to me, and at least people can
do a web search for SHT_SYMTAB_SHNDX.
Ok, so I decided to install the first version of the patch.
Thanks for review,
Martin
Thanks.
Ian