/* tc-hppa.c -- Assemble for the PA
- Copyright (C) 1989-2017 Free Software Foundation, Inc.
+ Copyright (C) 1989-2019 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
valueT
md_section_align (asection *segment, valueT size)
{
- int align = bfd_get_section_alignment (stdoutput, segment);
+ int align = bfd_section_alignment (segment);
int align2 = (1 << align) - 1;
return (size + align2) & ~align2;
s = expr_end;
CHECK_FIELD (num, 63, 0, strict);
if (num & 0x20)
- ;
- else
- opcode |= (1 << 13);
+ opcode &= ~(1 << 13);
INSERT_FIELD_AND_CONTINUE (opcode, num & 0x1f, 21);
/* Handle a 5 bit immediate at 10. */
/* If this instruction is specific to a particular architecture,
then set a new architecture. This automatic promotion crud is
for compatibility with HP's old assemblers only. */
- if (match == TRUE
+ if (match
&& bfd_get_mach (stdoutput) < insn->arch
&& !bfd_set_arch_mach (stdoutput, bfd_arch_hppa, insn->arch))
{
char *name, *p;
symbolS *symbolP;
- if ((bfd_get_section_flags (stdoutput, now_seg)
+ if ((bfd_section_flags (now_seg)
& (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
!= (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
return;
else
{
symbolP = symbol_new (name, now_seg,
- S_GET_VALUE (call_info->start_symbol), frag_now);
+ S_GET_VALUE (call_info->start_symbol),
+ symbol_get_frag (call_info->start_symbol));
gas_assert (symbolP);
S_CLEAR_EXTERNAL (symbolP);
symbol_table_insert (symbolP);
if (seg == ASEC_NULL)
{
seg = subseg_new (UNWIND_SECTION_NAME, 0);
- bfd_set_section_flags (stdoutput, seg,
- SEC_READONLY | SEC_HAS_CONTENTS
- | SEC_LOAD | SEC_RELOC | SEC_ALLOC | SEC_DATA);
- bfd_set_section_alignment (stdoutput, seg, 2);
+ bfd_set_section_flags (seg, (SEC_READONLY | SEC_HAS_CONTENTS | SEC_LOAD
+ | SEC_RELOC | SEC_ALLOC | SEC_DATA));
+ bfd_set_section_alignment (seg, 2);
}
subseg_set (seg, 0);
#ifdef OBJ_ELF
/* ELF needs to mark the end of each function so that it can compute
- the size of the function (apparently its needed in the symbol table). */
+ the size of the function (apparently it's needed in the symbol table). */
hppa_elf_mark_end_of_function ();
#endif
seg_info (section)->bss = 1;
/* Now set the flags. */
- bfd_set_section_flags (stdoutput, section, applicable);
+ bfd_set_section_flags (section, applicable);
/* Record any alignment request for this section. */
record_alignment (section, exact_log2 (alignment));
/* Set the starting offset for this section. */
- bfd_set_section_vma (stdoutput, section,
- pa_subspace_start (space, quadrant));
+ bfd_set_section_vma (section, pa_subspace_start (space, quadrant));
/* Now that all the flags are set, update an existing subspace,
or create a new one. */
{
text_section = segment;
applicable = bfd_applicable_section_flags (stdoutput);
- bfd_set_section_flags (stdoutput, segment,
+ bfd_set_section_flags (segment,
applicable & (SEC_ALLOC | SEC_LOAD
| SEC_RELOC | SEC_CODE
| SEC_READONLY
{
data_section = segment;
applicable = bfd_applicable_section_flags (stdoutput);
- bfd_set_section_flags (stdoutput, segment,
+ bfd_set_section_flags (segment,
applicable & (SEC_ALLOC | SEC_LOAD
| SEC_RELOC
| SEC_HAS_CONTENTS));
{
bss_section = segment;
applicable = bfd_applicable_section_flags (stdoutput);
- bfd_set_section_flags (stdoutput, segment,
+ bfd_set_section_flags (segment,
applicable & SEC_ALLOC);
}
else if (!strcmp (pa_def_subspaces[i].name, "$LIT$"))
{
applicable = bfd_applicable_section_flags (stdoutput);
- bfd_set_section_flags (stdoutput, segment,
+ bfd_set_section_flags (segment,
applicable & (SEC_ALLOC | SEC_LOAD
| SEC_RELOC
| SEC_READONLY
else if (!strcmp (pa_def_subspaces[i].name, "$MILLICODE$"))
{
applicable = bfd_applicable_section_flags (stdoutput);
- bfd_set_section_flags (stdoutput, segment,
+ bfd_set_section_flags (segment,
applicable & (SEC_ALLOC | SEC_LOAD
| SEC_RELOC
| SEC_READONLY
else if (!strcmp (pa_def_subspaces[i].name, "$UNWIND$"))
{
applicable = bfd_applicable_section_flags (stdoutput);
- bfd_set_section_flags (stdoutput, segment,
+ bfd_set_section_flags (segment,
applicable & (SEC_ALLOC | SEC_LOAD
| SEC_RELOC
| SEC_READONLY
{
struct fix *new_fix;
- new_fix = obj_elf_vtable_entry (0);
+ new_fix = obj_elf_get_vtable_entry ();
if (new_fix)
{
{
struct fix *new_fix;
- new_fix = obj_elf_vtable_inherit (0);
+ new_fix = obj_elf_get_vtable_inherit ();
if (new_fix)
{