This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch ob] Disallow -pie and -static


I'm committing this patch under the trivial and obvious rule. If -pie
and -static are both given together, gold will currently issue an
internal error.

Tested on x86_64.

-cary


	* options.cc (General_options::finalize): Disallow -pie and -static.


Index: options.cc
===================================================================
RCS file: /cvs/src/src/gold/options.cc,v
retrieving revision 1.117
diff -u -p -r1.117 options.cc
--- options.cc	3 Nov 2011 04:32:01 -0000	1.117
+++ options.cc	15 Feb 2012 00:40:25 -0000
@@ -1203,6 +1203,8 @@ General_options::finalize()
     gold_fatal(_("-shared and -static are incompatible"));
   if (this->shared() && this->pie())
     gold_fatal(_("-shared and -pie are incompatible"));
+  if (this->pie() && this->is_static())
+    gold_fatal(_("-pie and -static are incompatible"));

   if (this->shared() && this->relocatable())
     gold_fatal(_("-shared and -r are incompatible"));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]