/* Generic BFD library interface and support routines.
- Copyright (C) 1990-2021 Free Software Foundation, Inc.
+ Copyright (C) 1990-2022 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
. {* The number of sections. *}
. unsigned int section_count;
.
+. {* The archive plugin file descriptor. *}
+. int archive_plugin_fd;
+.
+. {* The number of opens on the archive plugin file descriptor. *}
+. unsigned int archive_plugin_fd_open_count;
+.
. {* A field used by _bfd_generic_link_add_archive_symbols. This will
. be used only for archive elements. *}
. int archive_pass;
.
+. {* The total size of memory from bfd_alloc. *}
+. bfd_size_type alloc_size;
+.
. {* Stuff only useful for object files:
. The start address. *}
. bfd_vma start_address;
*sptr++ = ptr[-1];
*sptr = '\0';
#endif
-#if defined (__GNUC__) || defined (HAVE_LONG_LONG)
PRINT_TYPE (long long, ll);
-#else
- /* Fake it and hope for the best. */
- PRINT_TYPE (long, l);
-#endif
break;
}
}
if (wide_width == 0)
PRINT_TYPE (double, d);
else
- {
-#if defined (__GNUC__) || defined (HAVE_LONG_DOUBLE)
- PRINT_TYPE (long double, ld);
-#else
- /* Fake it and hope for the best. */
- PRINT_TYPE (double, d);
-#endif
- }
+ PRINT_TYPE (long double, ld);
}
break;
case 's':
break;
case 2:
default:
-#if defined (__GNUC__) || defined (HAVE_LONG_LONG)
arg_type = LongLong;
-#else
- arg_type = Long;
-#endif
break;
}
}
if (wide_width == 0)
arg_type = Double;
else
- {
-#if defined (__GNUC__) || defined (HAVE_LONG_DOUBLE)
- arg_type = LongDouble;
-#else
- arg_type = Double;
-#endif
- }
+ arg_type = LongDouble;
}
break;
case 's':
|| strcmp (name, "pei-i386") == 0
|| strcmp (name, "pe-x86-64") == 0
|| strcmp (name, "pei-x86-64") == 0
+ || strcmp (name, "pei-aarch64-little") == 0
|| strcmp (name, "pe-arm-wince-little") == 0
|| strcmp (name, "pei-arm-wince-little") == 0
|| strcmp (name, "aixcoff-rs6000") == 0
elf_gp (abfd) = v;
}
+/*
+FUNCTION
+ bfd_set_gp_value
+
+SYNOPSIS
+ void bfd_set_gp_value (bfd *abfd, bfd_vma v);
+
+DESCRIPTION
+ Allow external access to the fucntion to set the GP value.
+ This is specifically added for gdb-compile support.
+*/
+
+void
+bfd_set_gp_value (bfd *abfd, bfd_vma v)
+{
+ _bfd_set_gp_value (abfd, v);
+}
+
/*
FUNCTION
bfd_scan_vma
if (sizeof (bfd_vma) <= sizeof (unsigned long))
return strtoul (string, (char **) end, base);
-#if defined (HAVE_STRTOULL) && defined (HAVE_LONG_LONG)
if (sizeof (bfd_vma) <= sizeof (unsigned long long))
return strtoull (string, (char **) end, base);
-#endif
if (base == 0)
{
bfd_emul_get_commonpagesize
SYNOPSIS
- bfd_vma bfd_emul_get_commonpagesize (const char *, bool);
+ bfd_vma bfd_emul_get_commonpagesize (const char *);
DESCRIPTION
Returns the common page size, in bytes, as determined by
*/
bfd_vma
-bfd_emul_get_commonpagesize (const char *emul, bool relro)
+bfd_emul_get_commonpagesize (const char *emul)
{
const bfd_target *target;
const struct elf_backend_data *bed;
bed = xvec_get_elf_backend_data (target);
- if (relro)
- return bed->relropagesize;
- else
- return bed->commonpagesize;
+ return bed->commonpagesize;
}
return 0;
}
Elf32_External_Chdr *echdr = (Elf32_External_Chdr *) contents;
bfd_put_32 (abfd, ELFCOMPRESS_ZLIB, &echdr->ch_type);
bfd_put_32 (abfd, sec->size, &echdr->ch_size);
- bfd_put_32 (abfd, 1 << sec->alignment_power,
+ bfd_put_32 (abfd, 1u << sec->alignment_power,
&echdr->ch_addralign);
/* bfd_log2 (alignof (Elf32_Chdr)) */
bfd_set_section_alignment (sec, 2);
bfd_put_32 (abfd, ELFCOMPRESS_ZLIB, &echdr->ch_type);
bfd_put_32 (abfd, 0, &echdr->ch_reserved);
bfd_put_64 (abfd, sec->size, &echdr->ch_size);
- bfd_put_64 (abfd, 1 << sec->alignment_power,
+ bfd_put_64 (abfd, UINT64_C (1) << sec->alignment_power,
&echdr->ch_addralign);
/* bfd_log2 (alignof (Elf64_Chdr)) */
bfd_set_section_alignment (sec, 3);