svn commit: r294530 - head/sys/sys
Ed Maste
emaste at freebsd.org
Thu Jan 21 21:13:10 UTC 2016
On 21 January 2016 at 16:00, Renato Botelho <garga at freebsd.org> wrote:
>> On Jan 21, 2016, at 18:44, Ed Maste <emaste at freebsd.org> wrote:
>>
>> Author: emaste
>> Date: Thu Jan 21 20:44:21 2016
>> New Revision: 294530
>> URL: https://svnweb.freebsd.org/changeset/base/294530
>>
>> Log:
>> Add STB_GNU_UNIQUE symbol binding definition
>>
>> Red Hat created STB_GNU_UNIQUE to handle certain special cases relating
>> to dynamically loading C++ DSOs[1].
>>
>> We don't (currently) have support for STB_GNU_UNIQUE, but ought to
>> reserve the value in ELFNN_ST_BIND. This will also be used by an
>> upcoming ELF Tool Chain import.
>>
>> [1] https://www.redhat.com/archives/posix-c++-wg/2009-August/msg00002.html
>>
>> MFC after: 1 week
>> Sponsored by: The FreeBSD Foundation
>>
>> Modified:
>> head/sys/sys/elf_common.h
>>
>> Modified: head/sys/sys/elf_common.h
>> ==============================================================================
>> --- head/sys/sys/elf_common.h Thu Jan 21 19:19:24 2016 (r294529)
>> +++ head/sys/sys/elf_common.h Thu Jan 21 20:44:21 2016 (r294530)
>> @@ -753,8 +753,9 @@ typedef struct {
>> #define STB_LOCAL 0 /* Local symbol */
>> #define STB_GLOBAL 1 /* Global symbol */
>> #define STB_WEAK 2 /* like global - lower precedence */
>> -#define STB_LOOS 10 /* Reserved range for operating system */
>> -#define STB_HIOS 12 /* specific semantics. */
>> +#define STB_LOOS 10 /* Start of operating system reserved range. */
>> +#define STB_GNU_UNIQUE 10 /* Unique symbol (GNU) */
>
> Looks like you meant to use 11 here, no?
No, it is supposed to be 10. STB_LOOS is a placeholder for the first
OS-specific entry, and STB_GNU_UNIQUE is the first one. It's similar
to STT_GNU_IFUNC (which we do use) -- it has the same value as
STT_LOOS.
These two are really more of a toolchain concern than a "GNU OS," but
either way STB_GNU_UNIQUE has the value 10, and if we end up
supporting this functionality we'll use the same value.
More information about the svn-src-all
mailing list