This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 1/4] ld: Update phase_enum/relro_enum and add seg_align_type
On Mon, Nov 13, 2017 at 8:11 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Sun, 12 Nov 2017, H.J. Lu wrote:
>
>> 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,
>
> I think this caused a build failure for powerpc targets.
>
> eelf64lppc.c: In function 'prelim_size_sections':
> eelf64lppc.c:349:29: error: 'exp_dataseg_none' undeclared (first use in this function)
> expld.dataseg.phase = exp_dataseg_none;
> ^
>
> I see:
>
> ppc32elf.em: expld.dataseg.phase = exp_dataseg_none;
> ppc64elf.em: expld.dataseg.phase = exp_dataseg_none;
> spuelf.em: expld.dataseg.phase = exp_dataseg_none;
This is the patch I checked in.
Thanks.
--
H.J.
---
>From 58e6cc77b7605e26cbf3fccc166089c01ceee95f Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 13 Nov 2017 08:19:10 -0800
Subject: [PATCH] ld: Replace exp_dataseg_none with exp_seg_none
* emultempl/ppc32elf.em (ppc_before_allocation): Replace
exp_dataseg_none with exp_seg_none.
* emultempl/ppc64elf.em (prelim_size_sections): Likewise.
* emultempl/spuelf.em (spu_before_allocation): Likewise.
---
ld/ChangeLog | 7 +++++++
ld/emultempl/ppc32elf.em | 2 +-
ld/emultempl/ppc64elf.em | 2 +-
ld/emultempl/spuelf.em | 2 +-
4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index a619491c72..16786d7020 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2017-11-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * emultempl/ppc32elf.em (ppc_before_allocation): Replace
+ exp_dataseg_none with exp_seg_none.
+ * emultempl/ppc64elf.em (prelim_size_sections): Likewise.
+ * emultempl/spuelf.em (spu_before_allocation): Likewise.
+
2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
* ldlang.c (lang_size_sections_1): Extract GNU_RELRO region check
diff --git a/ld/emultempl/ppc32elf.em b/ld/emultempl/ppc32elf.em
index b1ea04dd91..f78a117222 100644
--- a/ld/emultempl/ppc32elf.em
+++ b/ld/emultempl/ppc32elf.em
@@ -149,7 +149,7 @@ ppc_before_allocation (void)
if (expld.phase != lang_mark_phase_enum)
{
expld.phase = lang_mark_phase_enum;
- expld.dataseg.phase = exp_dataseg_none;
+ expld.dataseg.phase = exp_seg_none;
one_lang_size_sections_pass (NULL, FALSE);
lang_reset_memory_regions ();
}
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em
index ac306645d1..d6d5b0acf3 100644
--- a/ld/emultempl/ppc64elf.em
+++ b/ld/emultempl/ppc64elf.em
@@ -266,7 +266,7 @@ prelim_size_sections (void)
if (expld.phase != lang_mark_phase_enum)
{
expld.phase = lang_mark_phase_enum;
- expld.dataseg.phase = exp_dataseg_none;
+ expld.dataseg.phase = exp_seg_none;
one_lang_size_sections_pass (NULL, FALSE);
/* We must not cache anything from the preliminary sizing. */
lang_reset_memory_regions ();
diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em
index f8650a5e65..8d8aa25d0a 100644
--- a/ld/emultempl/spuelf.em
+++ b/ld/emultempl/spuelf.em
@@ -272,7 +272,7 @@ spu_before_allocation (void)
/* Size the sections. This is premature, but we need to know the
rough layout so that overlays can be found. */
expld.phase = lang_mark_phase_enum;
- expld.dataseg.phase = exp_dataseg_none;
+ expld.dataseg.phase = exp_seg_none;
one_lang_size_sections_pass (NULL, TRUE);
/* Find overlays by inspecting section vmas. */
--
2.13.6