This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR binutils/10802: objcopy an executable file compiled with PIE failed


On Mon, Oct 19, 2009 at 3:34 PM, Alan Modra <amodra@bigpond.net.au> wrote:
> On Mon, Oct 19, 2009 at 11:18:40AM -0700, H.J. Lu wrote:
>> Hi,
>>
>> We failed to preserve the permission bits on PIE since it is marked as
>> ET_DYN. ?This patch tries to preserve the permission bits when copying
>> a file. ?OK to install?
>
> ld does this differently. ?It sets EXEC_P on the output bfd before
> calling bfd_close. ?I think objcopy should do the same, or better,
> bfd/opncls.c:_maybe_make_executable should look at both EXEC_P and
> DYNAMIC.
>

The question is if objcopy should preserve the permission bits. Do we
really mark all DSOs with the X bit?

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]