rpms/binutils/devel binutils-2.20.51.0.7-gold-INPUT.patch, NONE, 1.1 binutils.spec, 1.196, 1.197

Nicholas Clifton nickc at fedoraproject.org
Wed Jun 9 15:02:07 UTC 2010


Author: nickc

Update of /cvs/pkgs/rpms/binutils/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv9833

Modified Files:
	binutils.spec 
Added Files:
	binutils-2.20.51.0.7-gold-INPUT.patch 
Log Message:
Allow GOLD linker to parse "-l<name>" directives inside INPUT statements in
linker scripts. (BZ 600553)


binutils-2.20.51.0.7-gold-INPUT.patch:
 script-c.h |    5 +++++
 script.cc  |   18 ++++++++++++++++++
 yyscript.y |    2 ++
 3 files changed, 25 insertions(+)

--- NEW FILE binutils-2.20.51.0.7-gold-INPUT.patch ---
diff -rcp ../binutils-2.20.51.0.7-original/gold/script.cc gold/script.cc
*** ../binutils-2.20.51.0.7-original/gold/script.cc	2010-06-09 15:18:46.000000000 +0100
--- gold/script.cc	2010-06-09 15:20:49.000000000 +0100
*************** script_add_file(void* closurev, const ch
*** 2589,2594 ****
--- 2589,2612 ----
    closure->inputs()->add_file(file);
  }
  
+ // Called by the bison parser to add a library to the link.
+ 
+ extern "C" void
+ script_add_library(void* closurev, const char* name, size_t length)
+ {
+   Parser_closure* closure = static_cast<Parser_closure*>(closurev);
+   std::string name_string(name, length);
+ 
+   if (name_string[0] != 'l')
+     gold_error(_("library name must be prefixed with -l"));
+     
+   Input_file_argument file(name_string.c_str() + 1,
+ 			   Input_file_argument::INPUT_FILE_TYPE_LIBRARY,
+ 			   "", false,
+ 			   closure->position_dependent_options());
+   closure->inputs()->add_file(file);
+ }
+ 
  // Called by the bison parser to start a group.  If we are already in
  // a group, that means that this script was invoked within a
  // --start-group --end-group sequence on the command line, or that
diff -rcp ../binutils-2.20.51.0.7-original/gold/script-c.h gold/script-c.h
*** ../binutils-2.20.51.0.7-original/gold/script-c.h	2010-06-09 15:18:47.000000000 +0100
--- gold/script-c.h	2010-06-09 15:21:05.000000000 +0100
*************** script_add_extern(void* closure, const c
*** 222,227 ****
--- 222,232 ----
  extern void
  script_add_file(void* closure, const char*, size_t);
  
+ /* Called by the bison parser to add a library to the link.  */
+ 
+ extern void
+ script_add_library(void* closure, const char*, size_t);
+ 
  /* Called by the bison parser to start and stop a group.  */
  
  extern void
diff -rcp ../binutils-2.20.51.0.7-original/gold/yyscript.y gold/yyscript.y
*** ../binutils-2.20.51.0.7-original/gold/yyscript.y	2010-06-09 15:18:46.000000000 +0100
--- gold/yyscript.y	2010-06-09 15:21:21.000000000 +0100
*************** input_list:
*** 314,319 ****
--- 314,321 ----
  input_list_element:
  	  string
  	    { script_add_file(closure, $1.value, $1.length); }
+ 	| '-' STRING
+ 	    { script_add_library(closure, $2.value, $2.length); }
  	| AS_NEEDED
  	    { script_start_as_needed(closure); }
  	  '(' input_list ')'


Index: binutils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/binutils/devel/binutils.spec,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -p -r1.196 -r1.197
--- binutils.spec	4 May 2010 20:10:34 -0000	1.196
+++ binutils.spec	9 Jun 2010 15:02:07 -0000	1.197
@@ -17,7 +17,7 @@
 Summary: A GNU collection of binary utilities
 Name: %{?cross}binutils%{?_with_debug:-debug}
 Version: 2.20.51.0.7
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv3+
 Group: Development/Tools
 URL: http://sources.redhat.com/binutils
@@ -34,6 +34,7 @@ Patch08: binutils-2.20.51.0.2-copy-osabi
 Patch09: binutils-2.20.51.0.7-do-not-bind-unique-symbols-locally.patch
 Patch10: binutils-2.20.51.0.7-dwarf4.patch
 Patch11: binutils-2.20.51.0.7-unique-archive-symbols.patch
+Patch12: binutils-2.20.51.0.7-gold-INPUT.patch
 
 %define gold_arches %ix86 x86_64
 
@@ -128,6 +129,7 @@ using libelf instead of BFD.
 %patch09 -p0 -b .do-not-bind-unique~
 %patch10 -p0 -b .dwarf4~
 %patch11 -p0 -b .unique~
+%patch12 -p0 -b .gold-input~
 
 # We cannot run autotools as there is an exact requirement of autoconf-2.59.
 
@@ -410,6 +412,9 @@ exit 0
 %endif # %{isnative}
 
 %changelog
+* Wed Jun   9 2010 Nick Clifton <nickc at redhat.com> - 2.20.51.0.7-4
+- Allow GOLD linker to parse "-l<name>" directives inside INPUT statements in linker scripts. (BZ 600553)
+
 * Tue May   4 2010 Nick Clifton <nickc at redhat.com> - 2.20.51.0.7-3
 - Allow unique symbols in archive maps.
 



More information about the scm-commits mailing list