[RFC][PATCH v2 0/6] binutils patches to add DT_GNU_UNIQUE

Cary Coutant ccoutant@gmail.com
Wed Jun 17 18:23:46 GMT 2020


> I should open by saying I originally implemented this as a new bitfield
> value for the payload of DT_FLAGS_1, but was told a new DT_GNU_… section
> might be more palatable/portable/less-conflict-prone.

I don't know why you were advised that, but it seems to me that using
DT_FLAGS_1 is the right approach. Dynamic table tags are meant to
convey a value other than a simple boolean; if all you need is a flag,
well, that's what DT_FLAGS and DT_FLAGS_1 are for. For precedent, note
that the old dynamic table entries DT_SYMBOLIC, DT_TEXTREL, and
DT_BIND_NOW have all been replaced by flags in DT_FLAGS.

DT_FLAGS_1 is a Gnu extension, so it's the place for a Gnu-specific
flag. Perhaps the concern was that DT_FLAGS_1 is also used by Solaris,
so I suppose you'd want to get agreement from them to use one of those
bits. You could always add a DT_GNU_FLAGS if DT_FLAGS_1 isn't
acceptable.

-cary


More information about the Gnu-gabi mailing list