[PATCH] define SHT_LLVM_ADDRSIG section rather than error out

Timm Bäder tbaeder@redhat.com
Tue Mar 9 07:40:07 GMT 2021

On 04/03/2021 14:59, Mark Wielaard wrote:
> Hi Timm,
> On Thu, 2021-03-04 at 14:44 +0100, Timm Bäder wrote:
>> any update on this? I see that SHT_LLVM_ADDRSIG is still not in upstream
>> glibc. Are you working on that, Navin?
>> As for the checks, I'm not sure we can do anything here since elfutils
>> can't know whether a symbol is rightfully marked as address-significant.
> I tried to lookup some more information about SHT_LLVM_ADDRSIG, but
> couldn't really find much. There is this comment about it from the
> binutils maintainers:
> https://www.sourceware.org/bugzilla/show_bug.cgi?id=23817#c1

Hm, that is unfortunate of course. I can't find a bug report about this
in llvm's bugzilla. I could try to get a discussion going there.

Are you opposed to work around this in elflint in the meantime?

E.g. ignore all sections starting with 'llvm_'?

diff --git a/src/elflint.c b/src/elflint.c
index 85cc7833..9a40045c 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -3766,6 +3766,9 @@ cannot get section header for section [%2zu] '%s': 

        const char *scnname = elf_strptr (ebl->elf, shstrndx, 

+      if (strncmp (scnname, ".llvm_", 6) == 0)
+        continue;
        if (scnname == NULL)
         ERROR (_("section [%2zu]: invalid name\n"), cnt);

(But I guess that belong after the NULL check)

Or does elflint use the any llvm_ section?
Asking because they only exist when compiling with clang of course and
elflint not handling (or ignoring) them causes the testsuite to fail.

- Timm

Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Michael O'Neill, Tom Savage, Eric 

More information about the Elfutils-devel mailing list