https://sourceware.org/bugzilla/show_bug.cgi?id=25617

--- Comment #27 from Kaylee <klkblake at gmail dot com> ---
Created attachment 12357
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12357&action=edit
testcase for objcopy breakage

This .so works fine, but if put through objcopy (even without flags), objcopy
will attempt to copy the program header, and extend the relevant PT_LOAD entry
to cover the new location. Unfortunately, it does not take into account that
the endpoints of a loaded region are rounded up to page sizes, and as a result
it will cause the first page of the second segment to overlap the last page of
the first segment.

I don't know if it's trying to create a second header because the .so -> BFD ->
.so conversion is lossy, or if it's actively trying to modify it, but probably
it should treat the program header as fixed, since application code may depend
both on the specific values stored in it and also that the values are correct.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to