/* tc-avr.c -- Assembler code for the ATMEL AVR
- Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2020 Free Software Foundation, Inc.
Contributed by Denis Chertykov <denisc@overta.ru>
This file is part of GAS, the GNU Assembler.
#include "as.h"
#include "safe-ctype.h"
#include "subsegs.h"
-#include "struc-symbol.h"
#include "dwarf2dbg.h"
#include "dw2gencfi.h"
#include "elf/avr.h"
valueT
md_section_align (asection *seg, valueT addr)
{
- int align = bfd_get_section_alignment (stdoutput, seg);
+ int align = bfd_section_alignment (seg);
return ((addr + (1 << align) - 1) & (-1UL << align));
}
sec = bfd_make_section (stdoutput, section_name);
if (sec == NULL)
as_fatal (_("Failed to create property section `%s'\n"), section_name);
- bfd_set_section_flags (stdoutput, sec, flags);
+ bfd_set_section_flags (sec, flags);
sec->output_section = sec;
return sec;
}
return;
prop_sec = avr_create_property_section ();
- bfd_set_section_size (stdoutput, prop_sec, sec_size);
+ bfd_set_section_size (prop_sec, sec_size);
subseg_set (prop_sec, 0);
frag_base = frag_more (sec_size);
symbolS *sy = avr_isr.sym_n_pushed;
/* Turn magic `__gcc_isr.n_pushed' into its now known value. */
- sy->sy_value.X_op = O_constant;
- sy->sy_value.X_add_number = n_pushed;
+ S_SET_VALUE (sy, n_pushed);
S_SET_SEGMENT (sy, expr_section);
avr_isr.sym_n_pushed = NULL;
}
/* Turn frag into ordinary code frag of now known size. */
fr->fr_var = 0;
- fr->fr_fix = (offsetT) (where - fr->fr_literal);
- gas_assert (fr->fr_fix <= fr->fr_offset);
+ fr->fr_fix = where - fr->fr_literal;
+ gas_assert (fr->fr_fix <= (valueT) fr->fr_offset);
fr->fr_offset = 0;
fr->fr_type = rs_fill;
fr->fr_subtype = 0;