2000-12-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>

* config/tc-ppc.c (md_pseudo_table): Add .file and .loc.
	(md_assemble): Call dwarf2_emit_insn.
	(shlib): Fix typo SHILB -> SHLIB.
	(md_parse_option): Likewise.
	(ppc_elf_validate_fix): Likewise:
	* config/tc-ppc.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
This commit is contained in:
Geoffrey Keating
2000-12-12 20:05:16 +00:00
parent 6d02a66752
commit 5d6f4f1679
3 changed files with 21 additions and 4 deletions

View File

@ -1,3 +1,12 @@
2000-12-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* config/tc-ppc.c (md_pseudo_table): Add .file and .loc.
(md_assemble): Call dwarf2_emit_insn.
(shlib): Fix typo SHILB -> SHLIB.
(md_parse_option): Likewise.
(ppc_elf_validate_fix): Likewise:
* config/tc-ppc.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
2000-12-12 Nick Clifton <nickc@redhat.com> 2000-12-12 Nick Clifton <nickc@redhat.com>
* cgen.h: Fix formatting. * cgen.h: Fix formatting.

View File

@ -29,6 +29,7 @@
#ifdef OBJ_ELF #ifdef OBJ_ELF
#include "elf/ppc.h" #include "elf/ppc.h"
#include "dwarf2dbg.h"
#endif #endif
#ifdef TE_PE #ifdef TE_PE
@ -197,6 +198,8 @@ const pseudo_typeS md_pseudo_table[] =
{ "rdata", ppc_elf_rdata, 0 }, { "rdata", ppc_elf_rdata, 0 },
{ "rodata", ppc_elf_rdata, 0 }, { "rodata", ppc_elf_rdata, 0 },
{ "lcomm", ppc_elf_lcomm, 0 }, { "lcomm", ppc_elf_lcomm, 0 },
{ "file", dwarf2_directive_file, 0 },
{ "loc", dwarf2_directive_loc, 0 },
#endif #endif
#ifdef TE_PE #ifdef TE_PE
@ -674,7 +677,7 @@ static struct hash_control *ppc_macro_hash;
#ifdef OBJ_ELF #ifdef OBJ_ELF
/* What type of shared library support to use */ /* What type of shared library support to use */
static enum { SHLIB_NONE, SHLIB_PIC, SHILB_MRELOCATABLE } shlib = SHLIB_NONE; static enum { SHLIB_NONE, SHLIB_PIC, SHLIB_MRELOCATABLE } shlib = SHLIB_NONE;
/* Flags to set in the elf header */ /* Flags to set in the elf header */
static flagword ppc_flags = 0; static flagword ppc_flags = 0;
@ -879,13 +882,13 @@ md_parse_option (c, arg)
/* -mrelocatable/-mrelocatable-lib -- warn about initializations that require relocation */ /* -mrelocatable/-mrelocatable-lib -- warn about initializations that require relocation */
else if (strcmp (arg, "relocatable") == 0) else if (strcmp (arg, "relocatable") == 0)
{ {
shlib = SHILB_MRELOCATABLE; shlib = SHLIB_MRELOCATABLE;
ppc_flags |= EF_PPC_RELOCATABLE; ppc_flags |= EF_PPC_RELOCATABLE;
} }
else if (strcmp (arg, "relocatable-lib") == 0) else if (strcmp (arg, "relocatable-lib") == 0)
{ {
shlib = SHILB_MRELOCATABLE; shlib = SHLIB_MRELOCATABLE;
ppc_flags |= EF_PPC_RELOCATABLE_LIB; ppc_flags |= EF_PPC_RELOCATABLE_LIB;
} }
@ -1553,7 +1556,7 @@ ppc_elf_validate_fix (fixp, seg)
case SHLIB_PIC: case SHLIB_PIC:
return; return;
case SHILB_MRELOCATABLE: case SHLIB_MRELOCATABLE:
if (fixp->fx_r_type <= BFD_RELOC_UNUSED if (fixp->fx_r_type <= BFD_RELOC_UNUSED
&& fixp->fx_r_type != BFD_RELOC_16_GOTOFF && fixp->fx_r_type != BFD_RELOC_16_GOTOFF
&& fixp->fx_r_type != BFD_RELOC_HI16_GOTOFF && fixp->fx_r_type != BFD_RELOC_HI16_GOTOFF
@ -2097,6 +2100,10 @@ md_assemble (str)
f = frag_more (4); f = frag_more (4);
md_number_to_chars (f, insn, 4); md_number_to_chars (f, insn, 4);
#ifdef OBJ_ELF
dwarf2_emit_insn (4);
#endif
/* Create any fixups. At this point we do not use a /* Create any fixups. At this point we do not use a
bfd_reloc_code_real_type, but instead just use the bfd_reloc_code_real_type, but instead just use the
BFD_RELOC_UNUSED plus the operand index. This lets us easily BFD_RELOC_UNUSED plus the operand index. This lets us easily

View File

@ -258,6 +258,7 @@ extern const char *ppc_comment_chars;
&& S_IS_DEFINED ((FIX)->fx_addsy) \ && S_IS_DEFINED ((FIX)->fx_addsy) \
&& ! S_IS_COMMON ((FIX)->fx_addsy))) && ! S_IS_COMMON ((FIX)->fx_addsy)))
#define DWARF2_LINE_MIN_INSN_LENGTH 4
#endif /* OBJ_ELF */ #endif /* OBJ_ELF */
/* call md_apply_fix3 with segment instead of md_apply_fix */ /* call md_apply_fix3 with segment instead of md_apply_fix */