projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automatic date update in version.in
[deliverable/binutils-gdb.git]
/
bfd
/
elf32-cr16.c
diff --git
a/bfd/elf32-cr16.c
b/bfd/elf32-cr16.c
index 3569c81e0ab60b072ebbef4a214502301301584e..c74cb22618fb01e950aef847e32c2f963d1c2ce3 100644
(file)
--- a/
bfd/elf32-cr16.c
+++ b/
bfd/elf32-cr16.c
@@
-1,5
+1,5
@@
/* BFD back-end for National Semiconductor's CR16 ELF
/* BFD back-end for National Semiconductor's CR16 ELF
- Copyright (C) 2007-20
19
Free Software Foundation, Inc.
+ Copyright (C) 2007-20
20
Free Software Foundation, Inc.
Written by M R Swami Reddy.
This file is part of BFD, the Binary File Descriptor library.
Written by M R Swami Reddy.
This file is part of BFD, the Binary File Descriptor library.
@@
-25,6
+25,7
@@
#include "libiberty.h"
#include "elf-bfd.h"
#include "elf/cr16.h"
#include "libiberty.h"
#include "elf-bfd.h"
#include "elf/cr16.h"
+#include "elf32-cr16.h"
/* The cr16 linker needs to keep track of the number of relocs that
it decides to copy in check_relocs for each symbol. This is so
/* The cr16 linker needs to keep track of the number of relocs that
it decides to copy in check_relocs for each symbol. This is so
@@
-610,7
+611,7
@@
_bfd_cr16_elf_create_got_section (bfd * abfd, struct bfd_link_info * info)
s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
htab->sgot= s;
if (s == NULL
s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
htab->sgot= s;
if (s == NULL
- || !
bfd_set_section_alignment (abfd,
s, ptralign))
+ || !
bfd_set_section_alignment (
s, ptralign))
return FALSE;
if (bed->want_got_plt)
return FALSE;
if (bed->want_got_plt)
@@
-618,7
+619,7
@@
_bfd_cr16_elf_create_got_section (bfd * abfd, struct bfd_link_info * info)
s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
htab->sgotplt = s;
if (s == NULL
s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
htab->sgotplt = s;
if (s == NULL
- || !
bfd_set_section_alignment (abfd,
s, ptralign))
+ || !
bfd_set_section_alignment (
s, ptralign))
return FALSE;
}
return FALSE;
}
@@
-1444,7
+1445,7
@@
elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
if (name == NULL || *name == '\0')
name = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
if (name == NULL || *name == '\0')
- name = bfd_section_name (
input_bfd,
sec);
+ name = bfd_section_name (sec);
}
switch (r)
}
switch (r)
@@
-1640,7
+1641,7
@@
static struct bfd_link_hash_table *
elf32_cr16_link_hash_table_create (bfd *abfd)
{
struct elf_link_hash_table *ret;
elf32_cr16_link_hash_table_create (bfd *abfd)
{
struct elf_link_hash_table *ret;
-
bfd_size_type
amt = sizeof (struct elf_link_hash_table);
+
size_t
amt = sizeof (struct elf_link_hash_table);
ret = (struct elf_link_hash_table *) bfd_zmalloc (amt);
if (ret == (struct elf_link_hash_table *) NULL)
ret = (struct elf_link_hash_table *) bfd_zmalloc (amt);
if (ret == (struct elf_link_hash_table *) NULL)
@@
-1673,8
+1674,8
@@
elf_cr16_mach (flagword flags)
file. This gets the CR16 architecture right based on the machine
number. */
file. This gets the CR16 architecture right based on the machine
number. */
-static
void
-_bfd_cr16_elf_final_write_processing (bfd *abfd
, bfd_boolean linker
)
+static
bfd_boolean
+_bfd_cr16_elf_final_write_processing (bfd *abfd)
{
unsigned long val;
switch (bfd_get_mach (abfd))
{
unsigned long val;
switch (bfd_get_mach (abfd))
@@
-1684,8
+1685,8
@@
_bfd_cr16_elf_final_write_processing (bfd *abfd, bfd_boolean linker)
val = EM_CR16;
break;
}
val = EM_CR16;
break;
}
- elf_elfheader (abfd)->e_flags |= val;
-
_bfd_elf_final_write_processing (abfd, linker
);
+
elf_elfheader (abfd)->e_flags |= val;
+
return _bfd_elf_final_write_processing (abfd
);
}
}
@@
-2241,7
+2242,7
@@
_bfd_cr16_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
flags | SEC_READONLY);
htab->srelplt = s;
if (s == NULL
flags | SEC_READONLY);
htab->srelplt = s;
if (s == NULL
- || !
bfd_set_section_alignment (abfd,
s, ptralign))
+ || !
bfd_set_section_alignment (
s, ptralign))
return FALSE;
if (! _bfd_cr16_elf_create_got_section (abfd, info))
return FALSE;
if (! _bfd_cr16_elf_create_got_section (abfd, info))
@@
-2278,7
+2279,7
@@
_bfd_cr16_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
? ".rela.bss" : ".rel.bss"),
flags | SEC_READONLY);
if (s == NULL
? ".rela.bss" : ".rel.bss"),
flags | SEC_READONLY);
if (s == NULL
- || !
bfd_set_section_alignment (abfd,
s, ptralign))
+ || !
bfd_set_section_alignment (
s, ptralign))
return FALSE;
}
}
return FALSE;
}
}
@@
-2463,7
+2464,7
@@
_bfd_cr16_elf_size_dynamic_sections (bfd * output_bfd,
/* It's OK to base decisions on the section name, because none
of the dynobj section names depend upon the input files. */
/* It's OK to base decisions on the section name, because none
of the dynobj section names depend upon the input files. */
- name = bfd_
get_section_name (dynobj,
s);
+ name = bfd_
section_name (
s);
if (strcmp (name, ".plt") == 0)
{
if (strcmp (name, ".plt") == 0)
{
@@
-2489,8
+2490,7
@@
_bfd_cr16_elf_size_dynamic_sections (bfd * output_bfd,
entry. The entries in the .rela.plt section
really apply to the .got section, which we
created ourselves and so know is not readonly. */
entry. The entries in the .rela.plt section
really apply to the .got section, which we
created ourselves and so know is not readonly. */
- outname = bfd_get_section_name (output_bfd,
- s->output_section);
+ outname = bfd_section_name (s->output_section);
target = bfd_get_section_by_name (output_bfd, outname + 5);
if (target != NULL
&& (target->flags & SEC_READONLY) != 0
target = bfd_get_section_by_name (output_bfd, outname + 5);
if (target != NULL
&& (target->flags & SEC_READONLY) != 0
@@
-2854,7
+2854,7
@@
bfd_cr16_elf32_create_embedded_relocs (bfd *abfd,
free (internal_relocs);
return TRUE;
free (internal_relocs);
return TRUE;
-error_return:
+
error_return:
if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
free (isymbuf);
if (internal_relocs != NULL
if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
free (isymbuf);
if (internal_relocs != NULL
This page took
0.024701 seconds
and
4
git commands to generate.