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: Why does ELF/alpha put none-text relocations in .rela.text?


On Mon, Aug 20, 2001 at 04:05:15PM -0700, H . J . Lu wrote:
> But we are using a random section symbol since we never reset now_seg.

Um, no, that's just as broken.



r~


	* config/tc-alpha.h (MD_APPLY_FIX3): Define.
	* config/tc-alpha.c (md_apply_fix3): Rename from md_apply_fix;
	use seg parameter instead of now_seg.

Index: tc-alpha.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-alpha.c,v
retrieving revision 1.24
diff -c -p -d -u -r1.24 tc-alpha.c
--- tc-alpha.c	2001/06/24 16:43:31	1.24
+++ tc-alpha.c	2001/08/21 00:08:15
@@ -1159,9 +1159,10 @@ md_pcrel_from (fixP)
    GPDISP.  */
 
 int
-md_apply_fix (fixP, valueP)
+md_apply_fix3 (fixP, valueP, seg)
      fixS *fixP;
      valueT *valueP;
+     segT seg;
 {
   char * const fixpos = fixP->fx_frag->fr_literal + fixP->fx_where;
   valueT value = *valueP;
@@ -1196,7 +1197,7 @@ md_apply_fix (fixP, valueP)
 #endif
 
     do_reloc_gp:
-      fixP->fx_addsy = section_symbol (now_seg);
+      fixP->fx_addsy = section_symbol (seg);
       md_number_to_chars (fixpos, value, 2);
       break;
 
Index: tc-alpha.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-alpha.h,v
retrieving revision 1.7
diff -c -p -d -u -r1.7 tc-alpha.h
--- tc-alpha.h	2001/07/23 14:02:12	1.7
+++ tc-alpha.h	2001/08/21 00:08:15
@@ -49,6 +49,7 @@ extern valueT alpha_gp_value;
 #define TC_FORCE_RELOCATION(FIXP)	alpha_force_relocation (FIXP)
 #define tc_fix_adjustable(FIXP)		alpha_fix_adjustable (FIXP)
 #define RELOC_REQUIRES_SYMBOL
+#define MD_APPLY_FIX3
 
 /* This expression evaluates to false if the relocation is for a local
    object for which we still want to do the relocation at runtime.


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