+Tue Dec 3 23:18:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-ppc.h ({tc,ppc}_comment_chars): Define, so that we can
+ change the comment characters.
+
+ * config/tc-ppc.c (comment_chars): Delete in favor of
+ tc_comment_chars.
+ (ppc_{eabi,solaris}_comment_chars): Eabi and Solaris versions of
+ comment chars.
+ (ppc_comment_chars): Select appropriate comment chars by default.
+ (msolaris): New flag for -m{,no-}solaris.
+ (md_parse_option): Recognize -K pic. Add support for
+ -m{,no-}solaris.
+ (md_show_usage): Update.
+ (md_begin): Do not set ELF flags if Solaris.
+ (ppc_elf_suffix): @local sets R_PPC_LOCAL24PC relocation.
+ (md_apply_fix3): Add support for R_PPC_LOCAL24PC.
+
+Mon Dec 2 13:48:57 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * as.c (main): Correct handling of flag_always_generate_output.
+
Sun Dec 1 21:46:05 1996 Jeffrey A Law (law@cygnus.com)
* config/tc-mn10300.c (tc_gen_reloc): Get the addend from
/* Generic assembler global variables which must be defined by all
targets. */
-/* Characters which always start a comment. */
+/* This string holds the chars that always start a comment. If the
+ pre-processor is disabled, these aren't very useful. The macro
+ tc_comment_chars points to this. We use this, rather than the
+ usual comment_chars, so that we can switch for Solaris conventions. */
+static const char ppc_solaris_comment_chars[] = "#!";
+static const char ppc_eabi_comment_chars[] = "#";
+
#ifdef TARGET_SOLARIS_COMMENT
-const char comment_chars[] = "#!";
+const char *ppc_comment_chars = ppc_solaris_comment_chars;
#else
-const char comment_chars[] = "#";
+const char *ppc_comment_chars = ppc_eabi_comment_chars;
#endif
/* Characters which start a comment at the beginning of a line. */
/* Flags to set in the elf header */
static flagword ppc_flags = 0;
+
+/* Whether this is Solaris or not. */
+#ifdef TARGET_SOLARIS_COMMENT
+#define SOLARIS_P true
+#else
+#define SOLARIS_P false
+#endif
+
+static boolean msolaris = SOLARIS_P;
#endif
#ifdef OBJ_XCOFF
case 'K':
/* Recognize -K PIC */
- if (strcmp (arg, "PIC") == 0)
+ if (strcmp (arg, "PIC") == 0 || strcmp (arg, "pic") == 0)
{
mrelocatable = true;
ppc_flags |= EF_PPC_RELOCATABLE_LIB;
target_big_endian = 1;
set_target_endian = 1;
}
+
+ else if (strcmp (arg, "solaris") == 0)
+ {
+ msolaris = true;
+ ppc_comment_chars = ppc_solaris_comment_chars;
+ }
+
+ else if (strcmp (arg, "no-solaris") == 0)
+ {
+ msolaris = false;
+ ppc_comment_chars = ppc_eabi_comment_chars;
+ }
#endif
else
{
-mlittle, -mlittle-endian\n\
generate code for a little endian machine\n\
-mbig, -mbig-endian generate code for a big endian machine\n\
+-msolaris generate code for Solaris\n\
+-mno-solaris do not generate code for Solaris\n\
-V print assembler version number\n\
-Qy, -Qn ignored\n");
#endif
#ifdef OBJ_ELF
/* Set the ELF flags if desired. */
- if (ppc_flags)
+ if (ppc_flags && !msolaris)
bfd_set_private_flags (stdoutput, ppc_flags);
#endif
MAP ("copy", BFD_RELOC_PPC_COPY),
MAP ("globdat", BFD_RELOC_PPC_GLOB_DAT),
MAP ("local24pc", BFD_RELOC_PPC_LOCAL24PC),
+ MAP ("local", BFD_RELOC_PPC_LOCAL24PC),
MAP ("plt", BFD_RELOC_32_PLTOFF),
MAP ("pltrel", BFD_RELOC_32_PLT_PCREL),
MAP ("plt@l", BFD_RELOC_LO16_PLTOFF),
/* The third argument to .lcomm is the alignment. */
if (*input_line_pointer != ',')
- align = 3;
+ align = 8;
else
{
++input_line_pointer;
if (align <= 0)
{
as_warn ("ignoring bad alignment");
- align = 3;
+ align = 8;
}
}
}
else
{
- as_bad_where (fixp->fx_file, fixp->fx_line,
- "unresolved expression that must be resolved");
+ char *sfile;
+ unsigned int sline;
+
+ /* Use expr_symbol_where to see if this is an expression
+ symbol. */
+ if (expr_symbol_where (fixp->fx_addsy, &sfile, &sline))
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ "unresolved expression that must be resolved");
+ else
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ "unsupported relocation type");
fixp->fx_done = 1;
return 1;
}
value, 1);
break;
+ case BFD_RELOC_PPC_LOCAL24PC:
+ if (!fixp->fx_pcrel)
+ abort ();
+
+ break;
+
default:
fprintf(stderr,
"Gas failure, reloc value %d\n", fixp->fx_r_type);