[gold commit] PR gold/14217: Fix internal error with -z relro when .tbss is last relro section
Cary Coutant
ccoutant@gmail.com
Sun Mar 22 05:32:00 GMT 2015
When calculating the padding necessary to align the end of the relro
segment to a page boundary, gold erroneously ignores the .tdata section
when checking to see if there are any relro sections (so if .tdata
is the only relro section, we fail to align the segment properly),
and erroneously pads the cumulative size of the segment based on
the alignment of .tbss. If there are no relro sections following .tbss,
it then fails to note the padding needed at the end of .tdata.
This patch fixes both problems. is_first_section_relro() will return
true when it sees a .tdata section, and we do not align the cumulative
size until after checking for the .tbss section.
-cary
2015-03-21 Cary Coutant <cary@google.com>
gold/
PR gold/14217
* output.cc (Output_segment::is_first_section_relro): Don't ignore
.tdata section.
(Output_segment::set_section_addresses): Don't align size of relro
segment for .tbss.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr14217-relro-tbss.patch
Type: application/octet-stream
Size: 1971 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150322/36e77fb5/attachment.obj>
More information about the Binutils
mailing list