This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH/ARM] Enable Gold to set EF_ARM_HASENTRY attribute on ARM
- From: Yury Gribov <y dot gribov at samsung dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 12 Feb 2014 15:25:11 +0400
- Subject: [PATCH/ARM] Enable Gold to set EF_ARM_HASENTRY attribute on ARM
- Authentication-results: sourceware.org; auth=none
Hi all,
This is a patch for
https://sourceware.org/bugzilla/show_bug.cgi?id=16533 which enables Gold
to set EF_ARM_HASENTRY flag on ARM platforms (to match BFD ld).
`make check-gold' reported no regressions.
-Y
diff --git a/elfcpp/arm.h b/elfcpp/arm.h
index cb85eeb..789fd6e 100644
--- a/elfcpp/arm.h
+++ b/elfcpp/arm.h
@@ -214,6 +214,8 @@ enum
EF_ARM_EABI_VER3 = 0x03000000,
EF_ARM_EABI_VER4 = 0x04000000,
EF_ARM_EABI_VER5 = 0x05000000,
+
+ EF_ARM_HASENTRY = 0x00000002,
};
// Extract EABI version from flags.
diff --git a/gold/arm.cc b/gold/arm.cc
index a1e8e4c..728883f 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -8619,6 +8619,9 @@ Target_arm<big_endian>::do_finalize_sections(
merged_any_attributes = true;
}
+ if (parameters->entry())
+ this->set_processor_specific_flags(this->processor_specific_flags() | elfcpp::EF_ARM_HASENTRY);
+
// Create an empty uninitialized attribute section if we still don't have it
// at this moment. This happens if there is no attributes sections in all
// inputs.