diff options
author | Richard Henderson <rth@redhat.com> | 1999-06-05 23:15:34 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 1999-06-05 23:15:34 +0000 |
commit | 9de8d8f1848f870605f4e94ffd9d2f1baa005c93 (patch) | |
tree | 8e6f6a20b2de6c7f1d91784f54b103d69774cffe /gas/config/tc-alpha.c | |
parent | 9894490542aa133d03f55b98fe59fabbfde335c0 (diff) | |
download | gdb-9de8d8f1848f870605f4e94ffd9d2f1baa005c93.zip gdb-9de8d8f1848f870605f4e94ffd9d2f1baa005c93.tar.gz gdb-9de8d8f1848f870605f4e94ffd9d2f1baa005c93.tar.bz2 |
* dwarf2dbg.c (dwarf2_gen_line_info): Mirror the section symbol
creation logic from obj_elf_create_section.
* config/obj-elf.c (elf_pseudo_tab): Add pushsection/popsection.
(section_stack): New.
(special_sections): Make const.
(obj_elf_section): Gut and rewrite parsing.
(obj_elf_change_section): New function broken out of obj_elf_section.
(obj_elf_parse_section_letters): Likewise.
(obj_elf_section_word): Likewise.
(obj_elf_section_type): Likewise.
(obj_elf_previous): Treat as a toggle.
(obj_elf_popsection): New.
* config/tc-ppc.c (ppc_section_word): Take str+len not ptr_str.
(ppc_section_type): Likewise.
* config/tc-ppc.h: Likewise.
* expr.h (struct expressionS): Don't make X_op a bitfield.
* config/tc-alpha.c: Update for symbol handling changes.
(md_apply_fix) [case GPREL]: Use now_seg instead of absolute_section.
(load_expression, emit_ir_load, emit_loadstore, emit_jsrjmp): Likewise.
Diffstat (limited to 'gas/config/tc-alpha.c')
-rw-r--r-- | gas/config/tc-alpha.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index a166309..791f15d 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -4,7 +4,7 @@ Written by Alessandro Forin, based on earlier gas-1.38 target CPU files. Modified by Ken Raeburn for gas-2.x and ECOFF support. Modified by Richard Henderson for ELF support. - Modified by Klaus K"ampf for EVAX (openVMS/Alpha) support. + Modified by Klaus K"ampf for EVAX (OpenVMS/Alpha) support. This file is part of GAS, the GNU Assembler. @@ -1081,7 +1081,7 @@ md_apply_fix (fixP, valueP) #endif do_reloc_gp: - fixP->fx_addsy = section_symbol (absolute_section); + fixP->fx_addsy = section_symbol (now_seg); md_number_to_chars (fixpos, value, 2); break; @@ -2110,9 +2110,6 @@ FIXME expressionS newtok[3]; expressionS addend; - /* We're going to need this symbol in md_apply_fix(). */ - (void) section_symbol (absolute_section); - #ifdef OBJ_ECOFF if (regno (tok[2].X_add_number) == AXP_REG_PV) ecoff_set_gp_prolog_size (0); @@ -2499,7 +2496,8 @@ load_expression (targreg, exp, pbasereg, poffset) } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; - insn.fixups[0].exp.X_op = O_constant; + insn.fixups[0].exp.X_op = O_symbol; + insn.fixups[0].exp.X_add_symbol = section_symbol (now_seg); insn.fixups[0].exp.X_add_number = 1; emit_lituse = 0; @@ -2650,7 +2648,8 @@ emit_ir_load (tok, ntok, opname) } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; - insn.fixups[0].exp.X_op = O_constant; + insn.fixups[0].exp.X_op = O_symbol; + insn.fixups[0].exp.X_add_symbol = section_symbol (now_seg); insn.fixups[0].exp.X_add_number = 1; } @@ -2703,7 +2702,8 @@ emit_loadstore (tok, ntok, opname) } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; - insn.fixups[0].exp.X_op = O_constant; + insn.fixups[0].exp.X_op = O_symbol; + insn.fixups[0].exp.X_add_symbol = section_symbol (now_seg); insn.fixups[0].exp.X_add_number = 1; } @@ -3288,7 +3288,8 @@ emit_jsrjmp (tok, ntok, vopname) } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; - insn.fixups[0].exp.X_op = O_constant; + insn.fixups[0].exp.X_op = O_symbol; + insn.fixups[0].exp.X_add_symbol = section_symbol (now_seg); insn.fixups[0].exp.X_add_number = 3; } @@ -3458,7 +3459,7 @@ s_alpha_comm (ignore) p = frag_more (temp); new_seg->flags |= SEC_IS_COMMON; if (! S_IS_DEFINED (symbolP)) - symbolP->bsym->section = new_seg; + S_SET_SEGMENT (symbolP, new_seg); #else S_SET_VALUE (symbolP, (valueT) temp); #endif @@ -3767,7 +3768,7 @@ s_alpha_ent (ignore) } symbol = make_expr_symbol (&symexpr); - symbol->bsym->flags |= BSF_FUNCTION; + symbol_get_bfdsym (symbol)->flags |= BSF_FUNCTION; alpha_evax_proc.symbol = symbol; demand_empty_rest_of_line (); @@ -3851,7 +3852,8 @@ s_alpha_pdesc (ignore) entry_sym = make_expr_symbol (&exp); /* Save bfd symbol of proc desc in function symbol. */ - alpha_evax_proc.symbol->bsym->udata.p = (PTR)entry_sym->bsym; + symbol_get_bfdsym (alpha_evax_proc.symbol)->udata.p + = symbol_get_bfdsym (entry_sym); SKIP_WHITESPACE (); if (*input_line_pointer++ != ',') @@ -4142,14 +4144,14 @@ s_alpha_file (ignore) extern char *demand_copy_string PARAMS ((int *lenP)); sprintf (case_hack, "<CASE:%01d%01d>", - alpha_flag_hash_long_names, alpha_flag_show_after_trunc); + alpha_flag_hash_long_names, alpha_flag_show_after_trunc); s = symbol_find_or_make (case_hack); - s->bsym->flags |= BSF_FILE; + symbol_get_bfdsym (s)->flags |= BSF_FILE; get_absolute_expression (); s = symbol_find_or_make (demand_copy_string (&length)); - s->bsym->flags |= BSF_FILE; + symbol_get_bfdsym (s)->flags |= BSF_FILE; demand_empty_rest_of_line (); return; |