Skip to content

Conversation

@cbouss
Copy link

@cbouss cbouss commented Aug 27, 2025

Description

Lief dynamic entry tags are defined here:
https://github.com/lief-project/LIEF/blob/main/include/LIEF/ELF/DynamicEntry.hpp#L47

We are seeing linux aarch64 binaries with tag TLSDESC_PLT, which is not defined in lief. lief stores that tag as a its hex value instead as an instance of lief.ELF.DynamicEntry.TAG.

conda build trips on this while looking for tag SONAME, with a ValueError: 1879047926 is not a valid TAG., as described in this issue: #5665

This is true for both lief 0.16.4 and 0.16.6.

Used workaround have been so far to:

This change filters dynamic_entries to only valid instances of ELF_DYNAMIC_TAGS.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review Aug 27, 2025
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Aug 27, 2025
@cbouss cbouss force-pushed the handle-unknown-dynamic-tags branch from e00817b to f19b061 Compare August 27, 2025 20:14
ryanskeith
ryanskeith previously approved these changes Sep 3, 2025
Copy link
Contributor

@ryanskeith ryanskeith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much. This looks good to me.

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Approved in 🔎 Review Sep 3, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Sep 4, 2025

CodSpeed Performance Report

Merging #5778 will not alter performance

Comparing cbouss:handle-unknown-dynamic-tags (29ba651) with main (bf20637)

Summary

✅ 5 untouched

@kenodegard
Copy link
Contributor

While some of the test failures are unrelated, e.g.:

Others are possibly related?

ryanskeith
ryanskeith previously approved these changes Sep 5, 2025
Copy link
Contributor

@ryanskeith ryanskeith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look great to me. Thank you @cbouss and @kenodegard

@ryanskeith
Copy link
Contributor

@cbouss let's work together to figure out why the tests are failing.

@ryanskeith ryanskeith self-requested a review September 5, 2025 21:17
@ryanskeith ryanskeith dismissed their stale review September 5, 2025 21:19

I reviewed before that tests ran. Somehow they required manual approval to run so it looked liked all was green.

@h-vetinari h-vetinari mentioned this pull request Nov 4, 2025
18 tasks
@jaimergp
Copy link
Contributor

jaimergp commented Nov 4, 2025

I rebased so we can get a functional CI again, but looks like there are some failing tests concerning this PR, @cbouss:

FAILED tests/test_post.py::test_file_hash - conda_build.exceptions.OverLinkingError: <exception str() failed>
FAILED tests/test_post.py::test_rpath_symlink - conda_build.exceptions.CondaBuildUserError: TESTS FAILED: rpath_symlink-1.0.0-h52ea4df_0.conda

@tkelman
Copy link
Contributor

tkelman commented Nov 4, 2025

Don't consider this question blocking at all for this workaround, but would there be any reason upstream lief wouldn't want to add an entry for TLSDESC_PLT to that enum?

@jaimergp
Copy link
Contributor

Don't consider this question blocking at all for this workaround, but would there be any reason upstream lief wouldn't want to add an entry for TLSDESC_PLT to that enum?

@tkelman, I guess that could work, but first they'd need an issue report. I tried opening one but couldn't come up with a reproducer. Here are some references that could help with the report:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

8 participants