[PATCH] non-PIC tweak for VAX
Jason R Thorpe
thorpej@wasabisystems.com
Sat Sep 28 16:17:00 GMT 2002
This was noticed when building with gcc-current, which doens't yet
support PIC for VAX ELF.
Committed to trunk.
* config/tc-vax.c (md_estimate_size_before_relax): Only try to
convert undefined references to GOT32/PLT32 if PIC code is
requested. Fix comment.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
-------------- next part --------------
Index: config/tc-vax.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-vax.c,v
retrieving revision 1.15
diff -c -r1.15 tc-vax.c
*** config/tc-vax.c 9 Jun 2002 00:45:42 -0000 1.15
--- config/tc-vax.c 28 Sep 2002 19:57:26 -0000
***************
*** 1244,1255 ****
old_fr_fix = fragP->fr_fix;
p = fragP->fr_literal + old_fr_fix;
#ifdef OBJ_ELF
! /*
! * If this is to undefined symbol, then if it's an indirect
! * reference indicate that is can mutated into a GLOB_DAT
! * by the loader. We restrict ourselves to no offset due to
! * a limitation in the NetBSD linker.
! */
if (GOT_symbol == NULL)
GOT_symbol = symbol_find (GLOBAL_OFFSET_TABLE_NAME);
if (PLT_symbol == NULL)
--- 1244,1254 ----
old_fr_fix = fragP->fr_fix;
p = fragP->fr_literal + old_fr_fix;
#ifdef OBJ_ELF
! /* If this is to an undefined symbol, then if it's an indirect
! reference indicate that is can mutated into a GLOB_DAT or
! JUMP_SLOT by the loader. We restrict ourselves to no offset
! due to a limitation in the NetBSD linker. */
!
if (GOT_symbol == NULL)
GOT_symbol = symbol_find (GLOBAL_OFFSET_TABLE_NAME);
if (PLT_symbol == NULL)
***************
*** 1257,1262 ****
--- 1256,1262 ----
if ((GOT_symbol == NULL || fragP->fr_symbol != GOT_symbol)
&& (PLT_symbol == NULL || fragP->fr_symbol != PLT_symbol)
&& fragP->fr_symbol != NULL
+ && flag_want_pic
&& (!S_IS_DEFINED (fragP->fr_symbol)
|| S_IS_WEAK (fragP->fr_symbol)
|| S_IS_EXTERNAL (fragP->fr_symbol)))
***************
*** 1269,1275 ****
}
else
{
-
if (((unsigned char *) fragP->fr_opcode)[0] == VAX_CALLS
|| ((unsigned char *) fragP->fr_opcode)[0] == VAX_CALLG
|| ((unsigned char *) fragP->fr_opcode)[0] == VAX_JSB
--- 1269,1274 ----
More information about the Binutils
mailing list