diff options
| author | Christian Marangi <ansuelsmth@gmail.com> | 2025-10-11 01:48:51 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-10-17 15:27:29 +0300 |
| commit | 78ffa5392394a62f7a50f54a2277f40bdb450907 (patch) | |
| tree | 4d7336592b7baab5cbfa9d4c1933633080d1a82f /unittests | |
| parent | ea82dba6c7141848d352235fc606907abaf750eb (diff) | |
| download | meson-78ffa5392394a62f7a50f54a2277f40bdb450907.tar.gz | |
depfixer: zero-out rpath entry string on removing entry
While investigating a reproducible problem with a binary compiled with
Meson, it was notice that the RPATH entry was never removed.
By comparing the binary from 2 different build system it was observed
that altough the RPATH entry was removed (verified by the readelf -d
command) the actual path was still present causing 2 different binary.
Going deeper in the Meson build process, it was discovered that
remove_rpath_entry only deletes the entry in the '.dynamic' section but
never actually 'clean' (or better say zero-out) the path from the
.dynstr section producing binary dependendt of the build system.
To address this, introduce a new helper to to zero-out the entry from
the .dynstr section permitting to produce REAL reproducible binary.
Additional logic was needed to handle GCC linker optimization for dynstr
table where the rpath string might be reused for other dym function
string. The setion that is actually removed is filled with 'X' following
patchelf behaviour.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'unittests')
0 files changed, 0 insertions, 0 deletions
