ld: Add lang_size_relro_segment
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Nov 2017 01:22:15 +0000 (17:22 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Nov 2017 01:22:24 +0000 (17:22 -0800)
commitcba6246d3ad332ab353afeff0016b195ffc69e05
treed699ece20321e996fe15658543252b59f687b4b4
parentd7475e036f69ff7ac78252db74a65fe4d617c4ee
ld: Add lang_size_relro_segment

Break lang_size_sections down into separate functions so that they can
also be used for text-only LOAD segment.  lang_size_relro_segment will
call lang_size_relro_segment_1 and lang_size_segment for both GNU_RELRO
segment and text-only LOAD segment.

* ldlang.c (lang_size_segment): New function.
(lang_size_relro_segment_1): Likewise.
(lang_size_relro_segment): Likewise.
(lang_size_sections): Rewrite to call lang_size_relro_segment.
ld/ChangeLog
ld/ldlang.c