This is the mail archive of the binutils@sources.redhat.com 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]

Re: Better handling of PIC suffixes in GAS expression parser


On Apr  9, 2001, Alexandre Oliva <aoliva@redhat.com> wrote:

> (note that the struc-symbol.h patch is missing; I'll post it
> separately, since it's actually an unrelated change)

Here it is, along with a new hook to be used to convert the SYMFIELD
of a local symbol when it is converted to a global symbol.  Ok to
install?

BTW, how do you feel about exporting local_symbol_make() (or
local_symbol_create, that would be called by it to allocate and
initialize the local symbol, without adding it to the local hash
table), so that it can be used to create the GOT, GOTOFF and PLT
symbols?  Currently, I'm using symbol_create() to create the symbols
without inserting them in the symbol table, which causes such pseudo
symbols to take up more memory than needed.

Index: gas/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* struc-symbol.h (struct local_symbol): New TC_LOCAL_SYMFIELD_TYPE.
	* symbols.c (local_symbol_convert): Call TC_LOCAL_SYMFIELD_CONVERT.

Index: gas/struc-symbol.h
===================================================================
RCS file: /cvs/src/src/gas/struc-symbol.h,v
retrieving revision 1.6
diff -u -p -r1.6 struc-symbol.h
--- gas/struc-symbol.h 2001/03/08 23:24:22 1.6
+++ gas/struc-symbol.h 2001/04/09 09:22:40
@@ -139,6 +139,10 @@ struct local_symbol
 
   /* The offset within the frag.  */
   valueT lsy_offset;
+
+#ifdef TC_LOCAL_SYMFIELD_TYPE
+  TC_LOCAL_SYMFIELD_TYPE lsy_tc;
+#endif
 };
 
 #define local_symbol_converted_p(l) ((l)->lsy_section == reg_section)
Index: gas/symbols.c
===================================================================
RCS file: /cvs/src/src/gas/symbols.c,v
retrieving revision 1.20
diff -u -p -r1.20 symbols.c
--- gas/symbols.c 2001/03/30 02:19:36 1.20
+++ gas/symbols.c 2001/04/09 09:22:41
@@ -255,6 +255,10 @@ local_symbol_convert (locsym)
   /* Local symbols are always either defined or used.  */
   ret->sy_used = 1;
 
+#ifdef TC_LOCAL_SYMFIELD_CONVERT
+  TC_LOCAL_SYMFIELD_CONVERT (locsym, ret);
+#endif
+
   symbol_table_insert (ret);
 
   local_symbol_mark_converted (locsym);

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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