mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-03-06 16:38:58 +00:00
Based on patch from Klaus Kaempf <kkaempf@progis.de>:
* struc-symbol.h (struct broken_word): Add seg and subseg fields. * read.c (emit_expr): Initialize seg and subseg fields of a new broken word. * write.c (write_object_file): Switch to the appropriate segment and subsegment when processing a broken word.
This commit is contained in:
parent
05a43d26fe
commit
4ea4905324
@ -1,5 +1,12 @@
|
|||||||
Fri May 29 13:46:07 1998 Ian Lance Taylor <ian@cygnus.com>
|
Fri May 29 13:46:07 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
Based on patch from Klaus Kaempf <kkaempf@progis.de>:
|
||||||
|
* struc-symbol.h (struct broken_word): Add seg and subseg fields.
|
||||||
|
* read.c (emit_expr): Initialize seg and subseg fields of a new
|
||||||
|
broken word.
|
||||||
|
* write.c (write_object_file): Switch to the appropriate segment
|
||||||
|
and subsegment when processing a broken word.
|
||||||
|
|
||||||
* config/tc-m68k.c (mri_assemble): New static function.
|
* config/tc-m68k.c (mri_assemble): New static function.
|
||||||
(build_mri_control_operand): Call mri_assemble rather than
|
(build_mri_control_operand): Call mri_assemble rather than
|
||||||
md_assemble.
|
md_assemble.
|
||||||
|
@ -2353,6 +2353,10 @@ s_org (ignore)
|
|||||||
expressionS exp;
|
expressionS exp;
|
||||||
register long temp_fill;
|
register long temp_fill;
|
||||||
|
|
||||||
|
#ifdef md_flush_pending_output
|
||||||
|
md_flush_pending_output ();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The m68k MRI assembler has a different meaning for .org. It
|
/* The m68k MRI assembler has a different meaning for .org. It
|
||||||
means to create an absolute section at a given address. We can't
|
means to create an absolute section at a given address. We can't
|
||||||
support that--use a linker script instead. */
|
support that--use a linker script instead. */
|
||||||
@ -3427,6 +3431,8 @@ emit_expr (exp, nbytes)
|
|||||||
x = (struct broken_word *) xmalloc (sizeof (struct broken_word));
|
x = (struct broken_word *) xmalloc (sizeof (struct broken_word));
|
||||||
x->next_broken_word = broken_words;
|
x->next_broken_word = broken_words;
|
||||||
broken_words = x;
|
broken_words = x;
|
||||||
|
x->seg = seg_now;
|
||||||
|
x->subseg = subseg_now;
|
||||||
x->frag = frag_now;
|
x->frag = frag_now;
|
||||||
x->word_goes_here = p;
|
x->word_goes_here = p;
|
||||||
x->dispfrag = 0;
|
x->dispfrag = 0;
|
||||||
|
@ -1522,6 +1522,7 @@ write_object_file ()
|
|||||||
{
|
{
|
||||||
expressionS exp;
|
expressionS exp;
|
||||||
|
|
||||||
|
subseg_change (lie->seg, lie->subseg);
|
||||||
exp.X_op = O_subtract;
|
exp.X_op = O_subtract;
|
||||||
exp.X_add_symbol = lie->add;
|
exp.X_add_symbol = lie->add;
|
||||||
exp.X_op_symbol = lie->sub;
|
exp.X_op_symbol = lie->sub;
|
||||||
@ -1566,6 +1567,7 @@ write_object_file ()
|
|||||||
addressT from_addr, to_addr;
|
addressT from_addr, to_addr;
|
||||||
int n, m;
|
int n, m;
|
||||||
|
|
||||||
|
subseg_change (lie->seg, lie->subseg);
|
||||||
fragP = lie->dispfrag;
|
fragP = lie->dispfrag;
|
||||||
|
|
||||||
/* Find out how many broken_words go here. */
|
/* Find out how many broken_words go here. */
|
||||||
@ -2550,7 +2552,7 @@ fixup_segment (fixP, this_segment_type)
|
|||||||
char buf[50];
|
char buf[50];
|
||||||
sprint_value (buf, fragP->fr_address + where);
|
sprint_value (buf, fragP->fr_address + where);
|
||||||
as_bad_where (fixP->fx_file, fixP->fx_line,
|
as_bad_where (fixP->fx_file, fixP->fx_line,
|
||||||
_("Subtraction of two symbols in different segments \"%s\" {%s segment} - \"%s\" {%s segment} at file address %s."),
|
_("Subtraction of two symbols in different sections \"%s\" {%s section} - \"%s\" {%s section} at file address %s."),
|
||||||
S_GET_NAME (add_symbolP),
|
S_GET_NAME (add_symbolP),
|
||||||
segment_name (S_GET_SEGMENT (add_symbolP)),
|
segment_name (S_GET_SEGMENT (add_symbolP)),
|
||||||
S_GET_NAME (sub_symbolP),
|
S_GET_NAME (sub_symbolP),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user