This is the mail archive of the
mailing list for the binutils project.
Re: [AArch64] Generate DT_TEXTREL when there is relocation against read-only section
- From: Jiong Wang <jiong dot wang at arm dot com>
- To: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Cc: "binutils\ at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 23 Jun 2015 12:26:21 +0100
- Subject: Re: [AArch64] Generate DT_TEXTREL when there is relocation against read-only section
- Authentication-results: sourceware.org; auth=none
- References: <n998ubgrrrz dot fsf at arm dot com> <CAFqB+Pw1pcjUAh0Y6rCP_xzxw1XTd0pmMuUbD50uiuEND08RgA at mail dot gmail dot com>
Marcus Shawcroft writes:
> On 19 June 2015 at 10:05, Jiong Wang <email@example.com> wrote:
>> This patch fix the SEGSEGV noticed on some scenarios when there is
>> relocation against read-only segment in the program.
>> We need to generate DT_TEXTREL entry in .dynamic section to
>> notify dynamic linker that there are relocations against read-only
>> segment, that dynamic linker can invoke mprotect to change the segment
>> attribute into writable, and after relocation finished, change it back
>> to read-only.
>> OK for trunk?
> OK, can you back port to 2.25 aswell please? /Marcus
Thanks. This atch applies cleanly on 2.25 branch, pushed to both.
2.25 : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=372832d02571c8a6e470cc601bd904c18f7bc374