tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: reducing relocations in unvis(3) implementation
In article <20121214175644.GA4734%britannica.bec.de@localhost>,
Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:
>On Fri, Dec 14, 2012 at 11:08:32AM -0600, Brooks Davis wrote:
>> I'm about to commit NetBSD's implementation of the vis(3) and unvis(3)
>> APIs to FreeBSD. When I asked for review Jilles Tjoelker commented:
>>
>> > Please avoid adding 100 relative relocations, for example by changing
>> > const char *name to char name[7].
>> >
>> > RTLD will have to adjust 100 pointers for the load address of libc.so.7,
>> > and even in a static library the pointers take up a disproportionate
>> > amount of space.
>>
>> The following patch accomplishes this.
>
>An even better option would be to use a perfect hash table, I think.
The code would need to be restructured, but yes!
christos
Home |
Main Index |
Thread Index |
Old Index