<div dir="ltr">yeah, sorry --- i haven't had time to debug this yet. (and so probably shouldn't have sent a patch yet, or at least just stuck to the obvious `\n` problem!)<div><br></div><div>there's clearly _something_ wrong with this specific ELF file, but i actually just took gnu readelf/llvm readelf's [implicit] word for it [since they had no warnings/errors] that it _wasn't_ the offset. (and i haven't had time today to draw myself a picture to convince myself one way or another whether there's an off-by-one here.)</div><div><br></div><div>i'll get back to you when i've actually worked out why Android's dynamic linker ends up looking at a bunch of 'X's in the file as if they're a dynamic header (despite the fact that a quick hex dump of the dynamic section looks plausible).</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 24, 2023 at 4:55 AM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 4/21/23 20:59, Rob Landley wrote:<br>
> On 4/21/23 15:02, enh via Toybox wrote:<br>
>> Bug: <a href="https://github.com/android/ndk/issues/1866" rel="noreferrer" target="_blank">https://github.com/android/ndk/issues/1866</a><br>
>> <<a href="https://github.com/android/ndk/issues/1866" rel="noreferrer" target="_blank">https://github.com/android/ndk/issues/1866</a>><br>
>> ---<br>
>> toys/other/readelf.c | 4 ++--<br>
>> 1 file changed, 2 insertions(+), 2 deletions(-)<br>
> <br>
> If offset == size you're one past the end of the file?<br>
> <br>
> What's the bug slash use case here?<br>
<br>
For reference, I read the thread and downloaded the libbz2.so they referenced<br>
and ran readelf -a on it, and didn't see an error message?<br>
<br>
(Happy to apply the fix, but I still don't quite understand the issue, and kinda<br>
want to reproduce it and add a test...)<br>
<br>
> Rob<br>
<br>
Rob<br>
</blockquote></div>