mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
Reverts patches providing octet support in dwarf
Reverts "dwarf2: Align relocation within .debug_line section" commit 204f543cae7a5dc908264b49d558191d0ceb989c, Reverts "dwarf2: Pad size of .debug_line section." commit 145c4477d239fef4e31a457ff8a1ba7153e9a448, Reverts "dwarf2: Use octets for .debug_line prologue" commit 38c24f42c97af59ad83505ed735e689c63d3ca45, Mostly reverts "dwarf2: Use octets for dwarf2 headers" commit 7235427998571b6d8267e7ac72a52d7b082f4c2b, Mostly reverts "Symbols with octets value" commit d18d199917337537713f9fc4b7ae4d6568f740cf. * dwarf2dbg.c (out_set_addr): Revert 2019-03-13 change. (out_debug_line, out_debug_aranges, out_debug_info): Likewise. * symbols.h (symbol_set_value_now_octets, symbol_octets_p): Remove. * symbols.c (struct symbol_flags): Remove member sy_octets. (symbol_temp_new_now_octets): Don't set symbol_flags::sy_octets. (resolve_symbol_value): Revert: Return octets instead of bytes if sy_octets is set. (symbol_set_value_now_octets): Remove. (symbol_octets_p): Remove.
This commit is contained in:

committed by
Alan Modra

parent
b5470a3c4a
commit
e2b9a97eda
@ -1,3 +1,15 @@
|
|||||||
|
2019-11-25 Christian Eggers <ceggers@gmx.de>
|
||||||
|
|
||||||
|
* dwarf2dbg.c (out_set_addr): Revert 2019-03-13 change.
|
||||||
|
(out_debug_line, out_debug_aranges, out_debug_info): Likewise.
|
||||||
|
* symbols.h (symbol_set_value_now_octets, symbol_octets_p): Remove.
|
||||||
|
* symbols.c (struct symbol_flags): Remove member sy_octets.
|
||||||
|
(symbol_temp_new_now_octets): Don't set symbol_flags::sy_octets.
|
||||||
|
(resolve_symbol_value): Revert: Return octets instead of bytes if
|
||||||
|
sy_octets is set.
|
||||||
|
(symbol_set_value_now_octets): Remove.
|
||||||
|
(symbol_octets_p): Remove.
|
||||||
|
|
||||||
2019-11-22 Mihail Ionescu <mihail.ionescu@arm.com>
|
2019-11-22 Mihail Ionescu <mihail.ionescu@arm.com>
|
||||||
|
|
||||||
* config/tc-arm.c (arm_ext_crc): New.
|
* config/tc-arm.c (arm_ext_crc): New.
|
||||||
|
@ -1136,28 +1136,16 @@ get_frag_fix (fragS *frag, segT seg)
|
|||||||
|
|
||||||
/* Set an absolute address (may result in a relocation entry). */
|
/* Set an absolute address (may result in a relocation entry). */
|
||||||
|
|
||||||
static void
|
|
||||||
out_inc_line_addr (int line_delta, addressT addr_delta);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
out_set_addr (symbolS *sym)
|
out_set_addr (symbolS *sym)
|
||||||
{
|
{
|
||||||
expressionS exp;
|
expressionS exp;
|
||||||
addressT expr_addr, expr_addr_aligned;
|
|
||||||
|
|
||||||
memset (&exp, 0, sizeof exp);
|
memset (&exp, 0, sizeof exp);
|
||||||
|
out_opcode (DW_LNS_extended_op);
|
||||||
|
out_uleb128 (sizeof_address + 1);
|
||||||
|
|
||||||
/* The expression at the bottom must be aligned to OCTETS_PER_BYTE. The
|
out_opcode (DW_LNE_set_address);
|
||||||
statements after the for loop will contribute 3 more octets. */
|
|
||||||
expr_addr = frag_now_fix_octets () + 3;
|
|
||||||
expr_addr_aligned = (expr_addr + OCTETS_PER_BYTE - 1) & -OCTETS_PER_BYTE;
|
|
||||||
for ( ; expr_addr != expr_addr_aligned; expr_addr++)
|
|
||||||
out_inc_line_addr (0, 0); /* NOP */
|
|
||||||
|
|
||||||
out_opcode (DW_LNS_extended_op); /* 1 octet */
|
|
||||||
out_uleb128 (sizeof_address + 1); /* 1 octet */
|
|
||||||
|
|
||||||
out_opcode (DW_LNE_set_address); /* 1 octet */
|
|
||||||
exp.X_op = O_symbol;
|
exp.X_op = O_symbol;
|
||||||
exp.X_add_symbol = sym;
|
exp.X_add_symbol = sym;
|
||||||
exp.X_add_number = 0;
|
exp.X_add_number = 0;
|
||||||
@ -1827,7 +1815,6 @@ out_debug_line (segT line_seg)
|
|||||||
symbolS *line_end;
|
symbolS *line_end;
|
||||||
struct line_seg *s;
|
struct line_seg *s;
|
||||||
int sizeof_offset;
|
int sizeof_offset;
|
||||||
addressT section_end, section_end_aligned;
|
|
||||||
|
|
||||||
memset (&exp, 0, sizeof exp);
|
memset (&exp, 0, sizeof exp);
|
||||||
sizeof_offset = out_header (line_seg, &exp);
|
sizeof_offset = out_header (line_seg, &exp);
|
||||||
@ -1844,7 +1831,7 @@ out_debug_line (segT line_seg)
|
|||||||
exp.X_op_symbol = prologue_start;
|
exp.X_op_symbol = prologue_start;
|
||||||
exp.X_add_number = 0;
|
exp.X_add_number = 0;
|
||||||
emit_expr (&exp, sizeof_offset);
|
emit_expr (&exp, sizeof_offset);
|
||||||
symbol_set_value_now_octets (prologue_start);
|
symbol_set_value_now (prologue_start);
|
||||||
|
|
||||||
/* Parameters of the state machine. */
|
/* Parameters of the state machine. */
|
||||||
out_byte (DWARF2_LINE_MIN_INSN_LENGTH);
|
out_byte (DWARF2_LINE_MIN_INSN_LENGTH);
|
||||||
@ -1869,7 +1856,7 @@ out_debug_line (segT line_seg)
|
|||||||
|
|
||||||
out_file_list ();
|
out_file_list ();
|
||||||
|
|
||||||
symbol_set_value_now_octets (prologue_end);
|
symbol_set_value_now (prologue_end);
|
||||||
|
|
||||||
/* For each section, emit a statement program. */
|
/* For each section, emit a statement program. */
|
||||||
for (s = all_segs; s; s = s->next)
|
for (s = all_segs; s; s = s->next)
|
||||||
@ -1889,17 +1876,7 @@ out_debug_line (segT line_seg)
|
|||||||
in the DWARF Line Number header. */
|
in the DWARF Line Number header. */
|
||||||
subseg_set (subseg_get (".debug_line_end", FALSE), 0);
|
subseg_set (subseg_get (".debug_line_end", FALSE), 0);
|
||||||
|
|
||||||
/* Pad size of .debug_line section to a multiple of OCTETS_PER_BYTE.
|
symbol_set_value_now (line_end);
|
||||||
Simply sizing the section in md_section_align() is not sufficient,
|
|
||||||
also the size field in the .debug_line header must be a multiple
|
|
||||||
of OCTETS_PER_BYTE. Not doing so will introduce gaps within the
|
|
||||||
.debug_line sections after linking. */
|
|
||||||
section_end = frag_now_fix_octets ();
|
|
||||||
section_end_aligned = (section_end + OCTETS_PER_BYTE - 1) & -OCTETS_PER_BYTE;
|
|
||||||
for ( ; section_end != section_end_aligned; section_end++)
|
|
||||||
out_inc_line_addr (0, 0); /* NOP */
|
|
||||||
|
|
||||||
symbol_set_value_now_octets (line_end);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -2018,7 +1995,7 @@ out_debug_aranges (segT aranges_seg, segT info_seg)
|
|||||||
md_number_to_chars (p, 0, addr_size);
|
md_number_to_chars (p, 0, addr_size);
|
||||||
md_number_to_chars (p + addr_size, 0, addr_size);
|
md_number_to_chars (p + addr_size, 0, addr_size);
|
||||||
|
|
||||||
symbol_set_value_now_octets (aranges_end);
|
symbol_set_value_now (aranges_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Emit data for .debug_abbrev. Note that this must be kept in
|
/* Emit data for .debug_abbrev. Note that this must be kept in
|
||||||
@ -2133,7 +2110,7 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT ranges_seg,
|
|||||||
dwarf2 draft has no standard code for assembler. */
|
dwarf2 draft has no standard code for assembler. */
|
||||||
out_two (DW_LANG_Mips_Assembler);
|
out_two (DW_LANG_Mips_Assembler);
|
||||||
|
|
||||||
symbol_set_value_now_octets (info_end);
|
symbol_set_value_now (info_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Emit the three debug strings needed in .debug_str and setup symbols
|
/* Emit the three debug strings needed in .debug_str and setup symbols
|
||||||
|
@ -73,10 +73,6 @@ struct symbol_flags
|
|||||||
before. It is cleared as soon as any direct reference to the
|
before. It is cleared as soon as any direct reference to the
|
||||||
symbol is present. */
|
symbol is present. */
|
||||||
unsigned int sy_weakrefd : 1;
|
unsigned int sy_weakrefd : 1;
|
||||||
|
|
||||||
/* This if set if the unit of the symbol value is "octets" instead
|
|
||||||
of "bytes". */
|
|
||||||
unsigned int sy_octets : 1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The information we keep for a symbol. Note that the symbol table
|
/* The information we keep for a symbol. Note that the symbol table
|
||||||
@ -850,9 +846,7 @@ symbol_temp_new_now (void)
|
|||||||
symbolS *
|
symbolS *
|
||||||
symbol_temp_new_now_octets (void)
|
symbol_temp_new_now_octets (void)
|
||||||
{
|
{
|
||||||
symbolS * symb = symbol_temp_new (now_seg, frag_now_fix_octets (), frag_now);
|
return symbol_temp_new (now_seg, frag_now_fix_octets (), frag_now);
|
||||||
symb->sy_flags.sy_octets = 1;
|
|
||||||
return symb;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
symbolS *
|
symbolS *
|
||||||
@ -1336,10 +1330,7 @@ resolve_symbol_value (symbolS *symp)
|
|||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
|
|
||||||
case O_constant:
|
case O_constant:
|
||||||
if (symp->sy_flags.sy_octets)
|
final_val += symp->sy_frag->fr_address / OCTETS_PER_BYTE;
|
||||||
final_val += symp->sy_frag->fr_address;
|
|
||||||
else
|
|
||||||
final_val += symp->sy_frag->fr_address / OCTETS_PER_BYTE;
|
|
||||||
if (final_seg == expr_section)
|
if (final_seg == expr_section)
|
||||||
final_seg = absolute_section;
|
final_seg = absolute_section;
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
@ -2651,18 +2642,6 @@ symbol_set_value_now (symbolS *sym)
|
|||||||
symbol_set_frag (sym, frag_now);
|
symbol_set_frag (sym, frag_now);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the value of SYM to the current position in the current segment,
|
|
||||||
in octets. */
|
|
||||||
|
|
||||||
void
|
|
||||||
symbol_set_value_now_octets (symbolS *sym)
|
|
||||||
{
|
|
||||||
S_SET_SEGMENT (sym, now_seg);
|
|
||||||
S_SET_VALUE (sym, frag_now_fix_octets ());
|
|
||||||
symbol_set_frag (sym, frag_now);
|
|
||||||
sym->sy_flags.sy_octets = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the frag of a symbol. */
|
/* Set the frag of a symbol. */
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -2934,13 +2913,6 @@ symbol_set_bfdsym (symbolS *s, asymbol *bsym)
|
|||||||
/* else XXX - What do we do now ? */
|
/* else XXX - What do we do now ? */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return whether symbol unit is "octets" (instead of "bytes"). */
|
|
||||||
|
|
||||||
int symbol_octets_p (symbolS *s)
|
|
||||||
{
|
|
||||||
return s->sy_flags.sy_octets;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef OBJ_SYMFIELD_TYPE
|
#ifdef OBJ_SYMFIELD_TYPE
|
||||||
|
|
||||||
/* Get a pointer to the object format information for a symbol. */
|
/* Get a pointer to the object format information for a symbol. */
|
||||||
|
@ -182,7 +182,6 @@ extern expressionS *symbol_get_value_expression (symbolS *);
|
|||||||
extern void symbol_set_value_expression (symbolS *, const expressionS *);
|
extern void symbol_set_value_expression (symbolS *, const expressionS *);
|
||||||
extern offsetT *symbol_X_add_number (symbolS *);
|
extern offsetT *symbol_X_add_number (symbolS *);
|
||||||
extern void symbol_set_value_now (symbolS *);
|
extern void symbol_set_value_now (symbolS *);
|
||||||
extern void symbol_set_value_now_octets (symbolS *);
|
|
||||||
extern void symbol_set_frag (symbolS *, fragS *);
|
extern void symbol_set_frag (symbolS *, fragS *);
|
||||||
extern fragS *symbol_get_frag (symbolS *);
|
extern fragS *symbol_get_frag (symbolS *);
|
||||||
extern void symbol_mark_used (symbolS *);
|
extern void symbol_mark_used (symbolS *);
|
||||||
@ -208,7 +207,6 @@ extern symbolS *symbol_symbolS (symbolS *);
|
|||||||
extern asymbol *symbol_get_bfdsym (symbolS *);
|
extern asymbol *symbol_get_bfdsym (symbolS *);
|
||||||
extern void symbol_set_bfdsym (symbolS *, asymbol *);
|
extern void symbol_set_bfdsym (symbolS *, asymbol *);
|
||||||
extern int symbol_same_p (symbolS *, symbolS *);
|
extern int symbol_same_p (symbolS *, symbolS *);
|
||||||
extern int symbol_octets_p (symbolS *);
|
|
||||||
|
|
||||||
#ifdef OBJ_SYMFIELD_TYPE
|
#ifdef OBJ_SYMFIELD_TYPE
|
||||||
OBJ_SYMFIELD_TYPE *symbol_get_obj (symbolS *);
|
OBJ_SYMFIELD_TYPE *symbol_get_obj (symbolS *);
|
||||||
|
Reference in New Issue
Block a user