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)
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)))
}
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
/*
* We found a match! So let's pick up as many operands as the
* instruction wants, and even gripe if there are too many.
- * We expect comma to seperate each operand.
+ * We expect comma to separate each operand.
* We let instring track the text, while p tracks a part of the
* struct vot.
*/
* There were a number of 'mismatched argument type' bugs to vip_op.
* The most general solution is to typedef each (of many) arguments.
* We used instead a typedef'd argument block. This is less modular
- * than using seperate return pointers for each result, but runs faster
+ * than using separate return pointers for each result, but runs faster
* on most engines, and seems to keep programmers happy. It will have
* to be done properly if we ever want to use vip_op as a general-purpose
* module (it was designed to be).
* We don't limit your choice of width character.
*
* DEC operands are hard work to parse. For example, '@' as the first
- * character means indirect (deferred) mode but elswhere it is a shift
+ * character means indirect (deferred) mode but elsewhere it is a shift
* operator.
* The long-winded explanation of how this is supposed to work is
* cancelled. Read a DEC vax manual.
*/
if (reg < 0)
{
- /* JF allow parenthasized expressions. I hope this works */
+ /* JF allow parenthesized expressions. I hope this works */
paren = 0;
while (*q != ')')
q++;
*/
\f
/*
- * Case of Rn. We seperate this one because it has a few special
+ * Case of Rn. We separate this one because it has a few special
* errors the remaining modes lack.
*
* in: at optional
\f
#ifdef OBJ_VMS
const char *md_shortopts = "d:STt:V+1h:Hv::";
-#elif defined(OBJ_ELC)
+#elif defined(OBJ_ELF)
const char *md_shortopts = "d:STt:VkK";
#else
const char *md_shortopts = "d:STt:V";
#endif
struct option md_longopts[] = {
+#ifdef OBJ_ELF
+#define OPTION_PIC (OPTION_MD_BASE)
+ {"pic", no_argument, NULL, OPTION_PIC},
+#endif
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof (md_longopts);
#endif
#ifdef OBJ_ELF
- case 'K':
+ case OPTION_PIC:
case 'k':
flag_want_pic = 1;
break; /* -pic, Position Independent Code */