diff options
author | Michael Meissner <gnu@the-meissners.org> | 1995-03-14 22:05:48 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1995-03-14 22:05:48 +0000 |
commit | ce9a28058393b83523a80937661165c0a58f2f1d (patch) | |
tree | 71b7d220630fcf376a5114f1a4525975bcd79546 /gas | |
parent | 4081daa1ed1c7370d33dded34bf716600e1b349f (diff) | |
download | gdb-ce9a28058393b83523a80937661165c0a58f2f1d.zip gdb-ce9a28058393b83523a80937661165c0a58f2f1d.tar.gz gdb-ce9a28058393b83523a80937661165c0a58f2f1d.tar.bz2 |
Warn rather than cause an error if the reloc is not compatible with -mrelocatable.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-ppc.c | 18 |
2 files changed, 19 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index bb25016..63b7cf2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 14 17:00:57 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * config/tc-ppc.c (ppc_elf_validate_fix): Use as_warn_where, not + as_bad_where to give a warning instead of an error. + Mon Mar 13 17:03:46 1995 Pat Rankin (rankin@eql.caltech.edu) * config/tc-vax.c (md_assemble): issue a warning if a constant diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 8938026..f21096d 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -25,6 +25,10 @@ #include "opcode/ppc.h" +#ifdef OBJ_ELF +#include "elf/ppc.h" +#endif + /* This is the assembler for the PowerPC or POWER (RS/6000) chips. */ /* FIXME: This should be handled in a different way. */ @@ -146,7 +150,7 @@ static struct hash_control *ppc_macro_hash; #ifdef OBJ_ELF /* Whether to warn about non PC relative relocations that aren't in the .got2 section. */ -static int mrelocatable = 0; +static boolean mrelocatable = false; #endif #ifdef OBJ_COFF @@ -264,7 +268,7 @@ md_parse_option (c, arg) #ifdef OBJ_ELF /* -mrelocatable -- warn about initializations that require relocation */ else if (strcmp (arg, "relocatable") == 0) - mrelocatable = 1; + mrelocatable = true; #endif else { @@ -360,6 +364,12 @@ md_begin () ppc_set_cpu (); +#ifdef OBJ_ELF + /* Set the -mrelocatable flag bit */ + if (mrelocatable) + bfd_set_private_flags (stdoutput, EF_PPC_RELOCATABLE); +#endif + /* Insert the opcodes into a hash table. */ ppc_hash = hash_new (); @@ -584,8 +594,8 @@ ppc_elf_validate_fix (fixS *fixp, segT seg) && strcmp (segment_name (seg), ".got2") != 0 && strcmp (segment_name (seg), ".stab") != 0) { - as_bad_where (fixp->fx_file, fixp->fx_line, - "Relocation cannot be done when using -mrelocatable"); + as_warn_where (fixp->fx_file, fixp->fx_line, + "Relocation cannot be done when using -mrelocatable"); } } |