[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/26706] pad strings in .dynstr
From: |
woodard at redhat dot com |
Subject: |
[Bug ld/26706] pad strings in .dynstr |
Date: |
Tue, 09 Mar 2021 00:41:46 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=26706
--- Comment #3 from Ben Woodard <woodard at redhat dot com> ---
Do you think it is worth me chiming in saying ‘what he said’? You captured my
intent perfectly. I guess I’m kind of hung up on “assume” in “what I assume
Ben, the original reporter, is after” or is that just a polite assume.
-ben
> On Mar 7, 2021, at 9:04 AM, mark at klomp dot org
> <sourceware-bugzilla@sourceware.org> wrote:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=26706
>
> --- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
> (In reply to Fangrui Song from comment #1)
>> You can additionally link an object file with an artificial long symbol
>> name. Since that symbol is not used, you can change its .dynstr
>
> I think that is really fragile. The way Solaris does this (what I assume Ben,
> the original reporter, is after) is by introducing a new dynamic section entry
> that provides the padding that is still available. That way tools know where
> and how much space they can use for dynamic strings.
>
> We could introduce DT_GNU_STRPAD and suggest that linkers initially set it to
> 256 (and add that to DT_STRSZ) to make such manipulations easy and robust. Any
> tool manipulating the .dynstr segement can then use (and update) that when
> adding a new string.
>
> See also: http://www.linker-aliens.org/blogs/ali/entry/changing_elf_runpaths/
>
> --
> You are receiving this mail because:
> You reported the bug.
--
You are receiving this mail because:
You are on the CC list for the bug.