aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-09-28 20:01:43 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-09-28 20:01:43 +0000
commit04ff5cb5c7bdb58241ac0674869e59d389692119 (patch)
tree0c0ba4b82ea0569314199ccb0cec600dc9173642 /gas
parent7079c36ccc7d18d5958f2ec2b73f9589cefa19ef (diff)
downloadfsf-binutils-gdb-04ff5cb5c7bdb58241ac0674869e59d389692119.zip
fsf-binutils-gdb-04ff5cb5c7bdb58241ac0674869e59d389692119.tar.gz
fsf-binutils-gdb-04ff5cb5c7bdb58241ac0674869e59d389692119.tar.bz2
* 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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-vax.c13
2 files changed, 13 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 641f7c1..cf754ab 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2002-09-28 Matt Thomas <matt@3am-software.com>
+ Jason Thorpe <thorpej@wasabisystems.com>
+
+ * 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.
+
2002-09-27 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* config/tc-sh.c (sh_force_relocation): Return 0 for
diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c
index a2bae67..2425663 100644
--- a/gas/config/tc-vax.c
+++ b/gas/config/tc-vax.c
@@ -1244,12 +1244,11 @@ md_estimate_size_before_relax (fragP, segment)
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 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,6 +1256,7 @@ md_estimate_size_before_relax (fragP, segment)
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,7 +1269,6 @@ md_estimate_size_before_relax (fragP, segment)
}
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