https://sourceware.org/bugzilla/show_bug.cgi?id=25617
--- Comment #30 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Kaylee from comment #27) > Created attachment 12357 [details] > 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. It has nothing to do with --remove-section-header. You get the same result without --remove-section-header using objcopy on master branch. -- You are receiving this mail because: You are on the CC list for the bug.