[PATCH] readelf: allow build with LLVM/clang

Mark Wielaard mark@klomp.org
Thu Jul 15 12:10:20 GMT 2021

Hi Timm,

On Thu, Jul 15, 2021 at 07:46:15AM +0200, Timm Baeder via Elfutils-devel wrote:
> FWIW, there is a different version of this patch at
> https://sourceware.org/pipermail/elfutils-devel/2021q1/003674.html
> that doesn't have those problems as far as I remember.

Indeed, that looks more clean. I still like the nested function
approach better since it is more concise. But I added a ChangeLog
entry and pushed the above as:

commit 779c57ea864d104bad88455535df9b26336349fd
Author: Timm Bäder <tbaeder@redhat.com>
Date:   Thu Mar 18 10:25:24 2021 +0100

    readelf: Pull advance_pc() in file scope
    Make advance_pc() a static function so we can get rid of another nested
    function. Rename it to run_advance_pc() and use a local advance_pc()
    macro to pass all the local variables. This is similar to what the
    equivalent code in libdw/dwarf_getsrclines.c is doing.
    Signed-off-by: Timm Bäder <tbaeder@redhat.com>

Sorry I missed this patch earilier.  If there are any other pending
patches that need review please ping them.



More information about the Elfutils-devel mailing list