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] |
Doug found that the PT_GNU_RELRO segment still wasn't being aligned properly on ARM, and we discovered that if the ORDER_RELRO_LAST list is empty (as it is for ARM), the padding we add doesn't get accounted for when setting the segment size. This patch fixes that by adding the padding to the increase_relro value, which is later added to the segment size in Output_segment::set_offset(). We also added an assert in set_offset() to verify that the RELRO segment is correctly aligned. Tested on x86_64 and ARM. OK? -cary (& Doug) * output.h (Output_segment::set_section_addresses): Pass increase_relro by reference; adjust all callers. * output.cc (Output_segment::set_section_addresses): Adjust references to increase_relro. Add padding to *increase_relro when ORDER_RELRO_LAST list is empty. (Output_segment::set_offset): Assert if PT_GNU_RELRO segment does not end at page boundary.
Attachment:
gold-arm-relro-patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |