ld: Update phase_enum/relro_enum and add seg_align_type
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Nov 2017 01:17:47 +0000 (17:17 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 13 Nov 2017 01:17:58 +0000 (17:17 -0800)
commit0f99513f2a52b7d73b94a1f77b8c6de9159b50d7
tree09f4858b812d81f4d02b85855b9e18794649001c
parentf882209d9aa5b68d68c45c5849e129ffc228749c
ld: Update phase_enum/relro_enum and add seg_align_type

Update GNU_RELRO date type so that they can also be used for text-only
LOAD segment.

* ldexp.h (phase_enum): Rename exp_dataseg_none,
exp_dataseg_align_seen, exp_dataseg_relro_seen,
exp_dataseg_end_seen, exp_dataseg_relro_adjust,
exp_dataseg_adjust and exp_dataseg_done to exp_seg_none,
exp_seg_align_seen, exp_seg_relro_seen, exp_seg_end_seen,
exp_seg_relro_adjust, exp_seg_adjust and exp_seg_done.
(relro_enum): Rename exp_dataseg_relro_none,
exp_dataseg_relro_start and exp_dataseg_relro_end to
exp_seg_relro_none, exp_seg_relro_start and exp_seg_relro_end.
(seg_align_type): New struct type.
(ldexp_control): Use seg_align_type.
* ldexp.c (fold_unary): Updated.
(fold_binary): Likewise.
* ldlang.c (strip_excluded_output_sections): Likewise.
(lang_size_sections_1): Likewise.
(lang_size_sections): Likewise.
ld/ChangeLog
ld/ldexp.c
ld/ldexp.h
ld/ldlang.c