aboutsummaryrefslogtreecommitdiff
path: root/bfd/cofflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-01-06 19:34:15 +1030
committerAlan Modra <amodra@gmail.com>2023-01-06 21:06:15 +1030
commit10df41b188b2692b6bc8c36d4003e0f8790d1f1b (patch)
tree8e35758d1b7208320c9808601492948b381be905 /bfd/cofflink.c
parent22a95e1a37aff28238e9d40bbe4441aa554a14c6 (diff)
downloadgdb-10df41b188b2692b6bc8c36d4003e0f8790d1f1b.zip
gdb-10df41b188b2692b6bc8c36d4003e0f8790d1f1b.tar.gz
gdb-10df41b188b2692b6bc8c36d4003e0f8790d1f1b.tar.bz2
Tidy pe flag in coff_data
Make it a bool, use obj_pe accessor everywhere.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r--bfd/cofflink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index d6ccae4..0722688 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -1168,7 +1168,7 @@ _bfd_coff_final_link (bfd *abfd,
static char *
dores_com (char *ptr, bfd *output_bfd, int heap)
{
- if (coff_data(output_bfd)->pe)
+ if (obj_pe (output_bfd))
{
int val = strtoul (ptr, &ptr, 0);
@@ -1400,7 +1400,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
output_index = syment_base;
outsym = flaginfo->outsyms;
- if (coff_data (output_bfd)->pe
+ if (obj_pe (output_bfd)
&& ! process_embedded_commands (output_bfd, flaginfo->info, input_bfd))
return false;
@@ -3057,7 +3057,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
- input_section->vma
+ input_section->output_offset
+ input_section->output_section->vma);
- if (coff_data (output_bfd)->pe)
+ if (obj_pe (output_bfd))
addr -= pe_data(output_bfd)->pe_opthdr.ImageBase;
if (fwrite (&addr, 1, sizeof (bfd_vma), (FILE *) info->base_file)
!= sizeof (bfd_vma))