Hi Mark,
On Tue, Feb 10, 2026 at 12:05 PM Mark Wielaard <[email protected]> wrote:
>
> It is valid for for two CUs to share the same base address attributes,
> so don't warn for that (which also would sets the exit status to
> non-zero).
>
> * src/readelf.c (compare_listptr): Remove listptr_base check.
>
> Signed-off-by: Mark Wielaard <[email protected]>
LGTM.
Aaron
> ---
> src/readelf.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/src/readelf.c b/src/readelf.c
> index 3eab60c14b57..2685c64af983 100644
> --- a/src/readelf.c
> +++ b/src/readelf.c
> @@ -5722,13 +5722,10 @@ compare_listptr (const void *a, const void *b)
> _("%s %#" PRIx64 " used with different offset sizes"),
> name, (uint64_t) p1->offset);
> }
> - if (listptr_base (p1) != listptr_base (p2))
> - {
> - p1->warned = p2->warned = true;
> - error (0, 0,
> - _("%s %#" PRIx64 " used with different base addresses"),
> - name, (uint64_t) p1->offset);
> - }
> +
> + /* Note: CUs can share the same listptr_base. So we don't check
> + (listptr_base (p1) != listptr_base (p2)) */
> +
> if (p1->attr != p2 ->attr)
> {
> p1->warned = p2->warned = true;
> --
> 2.52.0
>