[PATCH] ld: Don't check EI_OSABI value for input SHF_GNU_RETAIN section

Alan Modra amodra@gmail.com
Mon Mar 1 12:35:08 GMT 2021

On Fri, Feb 26, 2021 at 10:29:05PM -0800, Fangrui Song via Binutils wrote:
> This is consistent with how ld handles STT_GNU_IFUNC/STB_GNU_UNIQUE and allows
> other OSABI to adopt SHF_GNU_RETAIN.

I think this is going in the wrong direction.  STT_GNU_IFUNC and
STB_GNU_UNIQUE, which are both in the OS specific range, shouldn't
really be recognized without first checking OSABI.  Let's not make
that worse by allowing SHF_GNU_RETAIN too.

Alan Modra
Australia Development Lab, IBM

More information about the Binutils mailing list