Merge changes to binutils 2.16.1 in src/gnu/dist/binutils into 2.19.1.
This commit is contained in:
parent
00f46729f9
commit
abf07352b4
|
@ -158,6 +158,9 @@ struct ar_cache {
|
|||
#define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen)
|
||||
|
||||
#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))
|
||||
|
||||
static const char * normalize (bfd *, const char *);
|
||||
|
||||
#define arch_hdr(bfd) ((struct ar_hdr *) arch_eltdata (bfd)->arch_header)
|
||||
|
||||
void
|
||||
|
@ -715,7 +718,9 @@ bfd_generic_openr_next_archived_file (bfd *archive, bfd *last_file)
|
|||
/* Pad to an even boundary...
|
||||
Note that last_file->origin can be odd in the case of
|
||||
BSD-4.4-style element with a long odd size. */
|
||||
filestart += filestart % 2;
|
||||
if (!strncmp(arch_hdr (last_file)->ar_name, "#1/", 3))
|
||||
size += strlen(normalize(last_file, last_file->filename));
|
||||
filestart += size % 2;
|
||||
}
|
||||
|
||||
return _bfd_get_elt_at_filepos (archive, filestart);
|
||||
|
@ -1652,6 +1657,16 @@ bfd_ar_hdr_from_filesystem (bfd *abfd, const char *filename, bfd *member)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* If the caller requested that the BFD generate deterministic output,
|
||||
fake values for modification time, UID, GID, and file mode. */
|
||||
if ((abfd->flags & BFD_DETERMINISTIC_OUTPUT) != 0)
|
||||
{
|
||||
status.st_mtime = 0;
|
||||
status.st_uid = 0;
|
||||
status.st_gid = 0;
|
||||
status.st_mode = 0644;
|
||||
}
|
||||
|
||||
amt = sizeof (struct ar_hdr) + sizeof (struct areltdata);
|
||||
ared = bfd_zalloc (abfd, amt);
|
||||
if (ared == NULL)
|
||||
|
@ -1992,13 +2007,23 @@ _bfd_write_archive_contents (bfd *arch)
|
|||
current = current->archive_next)
|
||||
{
|
||||
char buffer[DEFAULT_BUFFERSIZE];
|
||||
unsigned int remaining = arelt_size (current);
|
||||
unsigned int saved_size = arelt_size (current);
|
||||
unsigned int remaining = saved_size;
|
||||
struct ar_hdr *hdr = arch_hdr (current);
|
||||
|
||||
/* Write ar header. */
|
||||
if (bfd_bwrite (hdr, sizeof (*hdr), arch)
|
||||
!= sizeof (*hdr))
|
||||
return FALSE;
|
||||
/* Write filename if it is a 4.4BSD extended file, and add to size. */
|
||||
if (!strncmp (hdr->ar_name, "#1/", 3))
|
||||
{
|
||||
const char *normal = normalize (current, current->filename);
|
||||
unsigned int thislen = strlen (normal);
|
||||
if (bfd_write (normal, 1, thislen, arch) != thislen)
|
||||
return FALSE;
|
||||
saved_size += thislen;
|
||||
}
|
||||
if (bfd_is_thin_archive (arch))
|
||||
continue;
|
||||
if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
|
||||
|
@ -2220,20 +2245,39 @@ bsd_write_armap (bfd *arch,
|
|||
unsigned int count;
|
||||
struct ar_hdr hdr;
|
||||
struct stat statbuf;
|
||||
long uid, gid;
|
||||
|
||||
firstreal = mapsize + elength + sizeof (struct ar_hdr) + SARMAG;
|
||||
|
||||
stat (arch->filename, &statbuf);
|
||||
if ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0)
|
||||
{
|
||||
/* Remember the timestamp, to keep it holy. But fudge it a little. */
|
||||
bfd_ardata (arch)->armap_timestamp = (statbuf.st_mtime
|
||||
+ ARMAP_TIME_OFFSET);
|
||||
uid = getuid();
|
||||
gid = getgid();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If deterministic, we use 0 as the timestamp in the map.
|
||||
Some linkers may require that the archive filesystem modification
|
||||
time is less than (or near to) the archive map timestamp. Those
|
||||
linkers should not be used with deterministic mode. (GNU ld and
|
||||
Gold do not have this restriction.) */
|
||||
bfd_ardata (arch)->armap_timestamp = 0;
|
||||
uid = 0;
|
||||
gid = 0;
|
||||
}
|
||||
|
||||
memset (&hdr, ' ', sizeof (struct ar_hdr));
|
||||
memcpy (hdr.ar_name, RANLIBMAG, strlen (RANLIBMAG));
|
||||
/* Remember the timestamp, to keep it holy. But fudge it a little. */
|
||||
bfd_ardata (arch)->armap_timestamp = statbuf.st_mtime + ARMAP_TIME_OFFSET;
|
||||
bfd_ardata (arch)->armap_datepos = (SARMAG
|
||||
+ offsetof (struct ar_hdr, ar_date[0]));
|
||||
_bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
|
||||
bfd_ardata (arch)->armap_timestamp);
|
||||
_bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", getuid ());
|
||||
_bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", getgid ());
|
||||
_bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", uid);
|
||||
_bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", gid);
|
||||
_bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", mapsize);
|
||||
memcpy (hdr.ar_fmag, ARFMAG, 2);
|
||||
if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
|
||||
|
@ -2251,8 +2295,11 @@ bsd_write_armap (bfd *arch,
|
|||
{
|
||||
do
|
||||
{
|
||||
firstreal += arelt_size (current) + sizeof (struct ar_hdr);
|
||||
firstreal += firstreal % 2;
|
||||
unsigned int size = arelt_size (current);
|
||||
if (!strncmp(arch_hdr (current)->ar_name, "#1/", 3))
|
||||
size += strlen(normalize(current, current->filename));
|
||||
firstreal += size + sizeof (struct ar_hdr);
|
||||
firstreal += size % 2;
|
||||
current = current->archive_next;
|
||||
}
|
||||
while (current != map[count].u.abfd);
|
||||
|
@ -2301,6 +2348,10 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
|
|||
struct stat archstat;
|
||||
struct ar_hdr hdr;
|
||||
|
||||
/* If creating deterministic archives, just leave the timestamp as-is. */
|
||||
if ((arch->flags & BFD_DETERMINISTIC_OUTPUT) != 0)
|
||||
return TRUE;
|
||||
|
||||
/* Flush writes, get last-write timestamp from file, and compare it
|
||||
to the timestamp IN the file. */
|
||||
bfd_flush (arch);
|
||||
|
@ -2385,7 +2436,8 @@ coff_write_armap (bfd *arch,
|
|||
_bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld",
|
||||
mapsize);
|
||||
_bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
|
||||
time (NULL));
|
||||
((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0
|
||||
? time (NULL) : 0));
|
||||
/* This, at least, is what Intel coff sets the values to. */
|
||||
_bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0);
|
||||
_bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0);
|
||||
|
|
|
@ -4689,6 +4689,11 @@ struct bfd
|
|||
/* This BFD has been created by the linker and doesn't correspond
|
||||
to any input file. */
|
||||
#define BFD_LINKER_CREATED 0x2000
|
||||
/* This may be set before writing out a BFD to request that it
|
||||
be written using values for UIDs, GIDs, timestamps, etc. that
|
||||
will be consistent from run to run. */
|
||||
#define BFD_DETERMINISTIC_OUTPUT 0x4000
|
||||
|
||||
|
||||
/* Currently my_archive is tested before adding origin to
|
||||
anything. I believe that this can become always an add of
|
||||
|
|
|
@ -145,6 +145,11 @@ CODE_FRAGMENT
|
|||
. to any input file. *}
|
||||
.#define BFD_LINKER_CREATED 0x2000
|
||||
.
|
||||
. {* This may be set before writing out a BFD to request that it
|
||||
. be written using values for UIDs, GIDs, timestamps, etc. that
|
||||
. will be consistent from run to run. *}
|
||||
.#define BFD_DETERMINISTIC_OUTPUT 0x4000
|
||||
.
|
||||
. {* Currently my_archive is tested before adding origin to
|
||||
. anything. I believe that this can become always an add of
|
||||
. origin, with origin set to 0 for non archive files. *}
|
||||
|
|
|
@ -686,7 +686,9 @@ alpha_adjust_reloc_in (abfd, intern, rptr)
|
|||
case ALPHA_R_OP_STORE:
|
||||
/* The STORE reloc needs the size and offset fields. We store
|
||||
them in the addend. */
|
||||
#if 0
|
||||
BFD_ASSERT (intern->r_offset <= 256);
|
||||
#endif
|
||||
rptr->addend = (intern->r_offset << 8) + intern->r_size;
|
||||
break;
|
||||
|
||||
|
|
|
@ -208,15 +208,15 @@ case "${targ}" in
|
|||
|
||||
armeb-*-netbsdelf*)
|
||||
targ_defvec=bfd_elf32_bigarm_vec
|
||||
targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec"
|
||||
targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec"
|
||||
;;
|
||||
arm-*-netbsdelf*)
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec"
|
||||
targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec"
|
||||
;;
|
||||
arm-*-netbsd* | arm-*-openbsd*)
|
||||
targ_defvec=armnetbsd_vec
|
||||
targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
|
||||
targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec armcoff_little_vec armcoff_big_vec"
|
||||
targ_underscore=yes
|
||||
targ_cflags=-D__QNXTARGET__
|
||||
;;
|
||||
|
@ -795,9 +795,9 @@ case "${targ}" in
|
|||
# targ_selvecs=m68kmach3_vec
|
||||
# targ_cflags=-DSTAT_FOR_EXEC
|
||||
;;
|
||||
m68*-hp*-netbsd*)
|
||||
m68k4k*-*-netbsd*)
|
||||
targ_defvec=m68k4knetbsd_vec
|
||||
targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
|
||||
targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec bfd_elf32_m68k_vec"
|
||||
targ_underscore=yes
|
||||
;;
|
||||
m68*-*-netbsdelf*)
|
||||
|
@ -873,6 +873,16 @@ case "${targ}" in
|
|||
targ_defvec=ecoff_big_vec
|
||||
targ_selvecs=ecoff_little_vec
|
||||
;;
|
||||
#ifdef BFD64
|
||||
mips64*el-*-netbsd*)
|
||||
targ_defvec=bfd_elf64_tradlittlemips_vec
|
||||
targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf32_nbigmips_vec bfd_elf32_nlittlemips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
|
||||
;;
|
||||
mips64*-*-netbsd*)
|
||||
targ_defvec=bfd_elf64_tradbigmips_vec
|
||||
targ_selvecs="bfd_elf64_tradlittlemips_vec bfd_elf32_nbigmips_vec bfd_elf32_nlittlemips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
|
||||
;;
|
||||
#endif
|
||||
mips*el-*-netbsd*)
|
||||
targ_defvec=bfd_elf32_tradlittlemips_vec
|
||||
targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_little_vec ecoff_big_vec"
|
||||
|
@ -1248,6 +1258,8 @@ case "${targ}" in
|
|||
want64=true
|
||||
;;
|
||||
|
||||
#endif
|
||||
|
||||
sh*l*-*-netbsdelf*)
|
||||
targ_defvec=bfd_elf32_shlnbsd_vec
|
||||
targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
|
||||
|
@ -1258,8 +1270,6 @@ case "${targ}" in
|
|||
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
|
||||
want64=true
|
||||
;;
|
||||
#endif
|
||||
|
||||
sh*-*-netbsdelf*)
|
||||
targ_defvec=bfd_elf32_shnbsd_vec
|
||||
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
|
||||
|
@ -1349,11 +1359,11 @@ case "${targ}" in
|
|||
;;
|
||||
sparc-*-netbsdelf*)
|
||||
targ_defvec=bfd_elf32_sparc_vec
|
||||
targ_selvecs=sparcnetbsd_vec
|
||||
targ_selvecs="sparcnetbsd_vec sunos_big_vec"
|
||||
;;
|
||||
sparc-*-netbsdaout* | sparc-*-netbsd*)
|
||||
sparc-*-netbsd*)
|
||||
targ_defvec=sparcnetbsd_vec
|
||||
targ_selvecs=bfd_elf32_sparc_vec
|
||||
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
|
||||
targ_underscore=yes
|
||||
;;
|
||||
sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1])
|
||||
|
@ -1397,6 +1407,10 @@ case "${targ}" in
|
|||
targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
|
||||
want64=true
|
||||
;;
|
||||
sparc64-*-netbsd*)
|
||||
targ_defvec=bfd_elf64_sparc_vec
|
||||
targ_selvecs="bfd_elf32_sparc_vec sparcnetbsd_vec sunos_big_vec"
|
||||
;;
|
||||
sparc64-*-elf*)
|
||||
targ_defvec=bfd_elf64_sparc_vec
|
||||
targ_selvecs=bfd_elf32_sparc_vec
|
||||
|
|
|
@ -18035,6 +18035,7 @@ if test "${target}" = "${host}"; then
|
|||
COREFILE=netbsd-core.lo
|
||||
;;
|
||||
arm-*-riscix) COREFILE=trad-core.lo ;;
|
||||
arm*-*-netbsd*) COREFILE=netbsd-core.lo ;;
|
||||
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
|
||||
hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
|
||||
hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
|
||||
|
@ -18097,7 +18098,7 @@ if test "${target}" = "${host}"; then
|
|||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i860mach3.h"'
|
||||
;;
|
||||
mips-*-netbsd* | mips*-*-openbsd*)
|
||||
mips*-*-netbsd* | mips*-*-openbsd*)
|
||||
COREFILE=netbsd-core.lo
|
||||
;;
|
||||
mips-dec-*)
|
||||
|
|
|
@ -56,6 +56,18 @@ mips*-*-riscos*) HDEFINES="-G 4" ;;
|
|||
|
||||
m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;;
|
||||
|
||||
sparc64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;;
|
||||
|
||||
x86_64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;;
|
||||
|
||||
*-*-aix*) HOST_64BIT_TYPE="long long"
|
||||
HOST_U_64BIT_TYPE="unsigned long long"
|
||||
;;
|
||||
|
||||
*-*-solaris*) HOST_64BIT_TYPE="long long"
|
||||
HOST_U_64BIT_TYPE="unsigned long long"
|
||||
;;
|
||||
|
||||
*-*-windows*)
|
||||
HOST_64BIT_TYPE=__int64
|
||||
HOST_U_64BIT_TYPE="unsigned __int64"
|
||||
|
|
|
@ -226,6 +226,7 @@ if test "${target}" = "${host}"; then
|
|||
COREFILE=netbsd-core.lo
|
||||
;;
|
||||
arm-*-riscix) COREFILE=trad-core.lo ;;
|
||||
arm*-*-netbsd*) COREFILE=netbsd-core.lo ;;
|
||||
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
|
||||
hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
|
||||
hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
|
||||
|
@ -312,7 +313,7 @@ changequote([,])dnl
|
|||
COREFILE=trad-core.lo
|
||||
TRAD_HEADER='"hosts/i860mach3.h"'
|
||||
;;
|
||||
mips-*-netbsd* | mips*-*-openbsd*)
|
||||
mips*-*-netbsd* | mips*-*-openbsd*)
|
||||
COREFILE=netbsd-core.lo
|
||||
;;
|
||||
mips-dec-*)
|
||||
|
|
|
@ -390,7 +390,9 @@ clean-libtool:
|
|||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
|
||||
bfd.info: bfd.texinfo $(bfd_TEXINFOS)
|
||||
bfd.info:
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_bfd.info: bfd.texinfo $(bfd_TEXINFOS)
|
||||
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
||||
rm -rf $$backupdir && mkdir $$backupdir && \
|
||||
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
|
||||
|
|
|
@ -120,6 +120,11 @@ struct bfd
|
|||
to any input file. */
|
||||
#define BFD_LINKER_CREATED 0x2000
|
||||
|
||||
/* This may be set before writing out a BFD to request that it
|
||||
be written using values for UIDs, GIDs, timestamps, etc. that
|
||||
will be consistent from run to run. */
|
||||
#define BFD_DETERMINISTIC_OUTPUT 0x4000
|
||||
|
||||
/* Currently my_archive is tested before adding origin to
|
||||
anything. I believe that this can become always an add of
|
||||
origin, with origin set to 0 for non archive files. */
|
||||
|
|
|
@ -2126,7 +2126,10 @@ readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
|
|||
if (s != NULL && (s->flags & SEC_READONLY) != 0)
|
||||
{
|
||||
struct bfd_link_info *info = (struct bfd_link_info *) inf;
|
||||
|
||||
if (info->warn_shared_textrel)
|
||||
(*_bfd_error_handler)
|
||||
(_("warning: dynamic relocation in readonly section `%s'"),
|
||||
h->root.root.string);
|
||||
info->flags |= DF_TEXTREL;
|
||||
|
||||
/* Not an error, just cut short the traversal. */
|
||||
|
|
|
@ -497,6 +497,24 @@ elf32_vax_set_private_flags (bfd *abfd, flagword flags)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* Copy vax-specific data from one module to another */
|
||||
static bfd_boolean
|
||||
elf32_vax_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
|
||||
{
|
||||
flagword in_flags;
|
||||
|
||||
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|
||||
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
|
||||
return TRUE;
|
||||
|
||||
in_flags = elf_elfheader (ibfd)->e_flags;
|
||||
|
||||
elf_elfheader (obfd)->e_flags = in_flags;
|
||||
elf_flags_init (obfd) = TRUE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Merge backend specific data from an object file to the output
|
||||
object file when linking. */
|
||||
static bfd_boolean
|
||||
|
@ -599,8 +617,9 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
|
|||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
{
|
||||
case R_VAX_GOT32:
|
||||
if (h != NULL
|
||||
&& strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
|
||||
BFD_ASSERT (h != NULL);
|
||||
if (h->forced_local
|
||||
|| h == elf_hash_table (info)->hgot)
|
||||
break;
|
||||
|
||||
/* This symbol requires a global offset table entry. */
|
||||
|
@ -673,8 +692,9 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
|
|||
|
||||
/* If this is a local symbol, we resolve it directly without
|
||||
creating a procedure linkage table entry. */
|
||||
if (h == NULL)
|
||||
continue;
|
||||
BFD_ASSERT(h != NULL);
|
||||
if (h->forced_local)
|
||||
break;
|
||||
|
||||
h->needs_plt = 1;
|
||||
if (h->plt.refcount == -1)
|
||||
|
@ -702,7 +722,7 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
|
|||
&& (!info->symbolic
|
||||
|| !h->def_regular)))
|
||||
{
|
||||
if (h != NULL)
|
||||
if (h != NULL && !h->forced_local)
|
||||
{
|
||||
/* Make sure a plt entry is created for this symbol if
|
||||
it turns out to be a function defined by a dynamic
|
||||
|
@ -714,6 +734,8 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
|
|||
}
|
||||
break;
|
||||
}
|
||||
if (h != NULL && h->forced_local)
|
||||
break;
|
||||
/* Fall through. */
|
||||
case R_VAX_8:
|
||||
case R_VAX_16:
|
||||
|
@ -766,8 +788,6 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
|
|||
|| !bfd_set_section_alignment (dynobj, sreloc, 2))
|
||||
return FALSE;
|
||||
}
|
||||
if (sec->flags & SEC_READONLY)
|
||||
info->flags |= DF_TEXTREL;
|
||||
}
|
||||
|
||||
sreloc->size += sizeof (Elf32_External_Rela);
|
||||
|
@ -1226,7 +1246,12 @@ elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
|
|||
continue;
|
||||
|
||||
/* Allocate memory for the section contents. */
|
||||
s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size);
|
||||
/* FIXME: This should be a call to bfd_alloc not bfd_zalloc.
|
||||
Unused entries should be reclaimed before the section's contents
|
||||
are written out, but at the moment this does not happen. Thus in
|
||||
order to prevent writing out garbage, we initialise the section's
|
||||
contents to zero. */
|
||||
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
|
||||
if (s->contents == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1327,7 +1352,8 @@ elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, PTR infoptr)
|
|||
srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
|
||||
|
||||
if (!elf_hash_table (info)->dynamic_sections_created
|
||||
|| (info->shared && info->symbolic))
|
||||
|| (info->shared && info->symbolic)
|
||||
|| h->forced_local)
|
||||
{
|
||||
h->got.refcount = 0;
|
||||
h->got.offset = (bfd_vma) -1;
|
||||
|
@ -1415,7 +1441,13 @@ elf_vax_relocate_section (bfd *output_bfd,
|
|||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
#if 0 /* XXXMRG */
|
||||
relocation = (sec->output_section->vma
|
||||
+ sec->output_offset
|
||||
+ sym->st_value);
|
||||
#else
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1431,10 +1463,11 @@ elf_vax_relocate_section (bfd *output_bfd,
|
|||
|| h->root.type == bfd_link_hash_defweak)
|
||||
&& ((r_type == R_VAX_PLT32
|
||||
&& h->plt.offset != (bfd_vma) -1
|
||||
&& !h->forced_local
|
||||
&& elf_hash_table (info)->dynamic_sections_created)
|
||||
|| (r_type == R_VAX_GOT32
|
||||
&& strcmp (h->root.root.string,
|
||||
"_GLOBAL_OFFSET_TABLE_") != 0
|
||||
&& h->got.offset != (bfd_vma) -1
|
||||
&& !h->forced_local
|
||||
&& elf_hash_table (info)->dynamic_sections_created
|
||||
&& (! info->shared
|
||||
|| (! info->symbolic && h->dynindx != -1)
|
||||
|
@ -1452,10 +1485,7 @@ elf_vax_relocate_section (bfd *output_bfd,
|
|||
&& h->def_dynamic))
|
||||
&& (r_type == R_VAX_8
|
||||
|| r_type == R_VAX_16
|
||||
|| r_type == R_VAX_32
|
||||
|| r_type == R_VAX_PC8
|
||||
|| r_type == R_VAX_PC16
|
||||
|| r_type == R_VAX_PC32))))
|
||||
|| r_type == R_VAX_32))))
|
||||
/* In these cases, we don't need the relocation
|
||||
value. We check specially because in some
|
||||
obscure cases sec->output_section will be NULL. */
|
||||
|
@ -1481,7 +1511,7 @@ elf_vax_relocate_section (bfd *output_bfd,
|
|||
case R_VAX_GOT32:
|
||||
/* Relocation is to the address of the entry for this symbol
|
||||
in the global offset table. */
|
||||
if (h == NULL || h->got.offset == (bfd_vma) -1)
|
||||
if (h == NULL || h->got.offset == (bfd_vma) -1 || h->forced_local)
|
||||
break;
|
||||
|
||||
/* Relocation is the offset of the entry for this symbol in
|
||||
|
@ -1547,6 +1577,7 @@ elf_vax_relocate_section (bfd *output_bfd,
|
|||
break;
|
||||
|
||||
if (h->plt.offset == (bfd_vma) -1
|
||||
|| h->forced_local
|
||||
|| !elf_hash_table (info)->dynamic_sections_created)
|
||||
{
|
||||
/* We didn't make a PLT entry for this symbol. This
|
||||
|
@ -1597,7 +1628,7 @@ elf_vax_relocate_section (bfd *output_bfd,
|
|||
case R_VAX_PC8:
|
||||
case R_VAX_PC16:
|
||||
case R_VAX_PC32:
|
||||
if (h == NULL)
|
||||
if (h == NULL || h->forced_local)
|
||||
break;
|
||||
/* Fall through. */
|
||||
case R_VAX_8:
|
||||
|
@ -1609,7 +1640,7 @@ elf_vax_relocate_section (bfd *output_bfd,
|
|||
&& ((r_type != R_VAX_PC8
|
||||
&& r_type != R_VAX_PC16
|
||||
&& r_type != R_VAX_PC32)
|
||||
|| ((input_section->flags & SEC_CODE)
|
||||
|| ((input_section->flags & SEC_CODE) != 0
|
||||
&& (!info->symbolic
|
||||
|| (!h->def_regular && h->type != STT_SECTION)))))
|
||||
{
|
||||
|
@ -1671,9 +1702,9 @@ elf_vax_relocate_section (bfd *output_bfd,
|
|||
{
|
||||
relocate = TRUE;
|
||||
outrel.r_info = ELF32_R_INFO (0, R_VAX_RELATIVE);
|
||||
BFD_ASSERT (bfd_get_signed_32 (input_bfd,
|
||||
&contents[rel->r_offset]) == 0);
|
||||
outrel.r_addend = relocation + rel->r_addend;
|
||||
outrel.r_addend = bfd_get_signed_32(input_bfd,
|
||||
&contents[rel->r_offset])
|
||||
+ relocation + rel->r_addend;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1712,8 +1743,8 @@ elf_vax_relocate_section (bfd *output_bfd,
|
|||
}
|
||||
}
|
||||
|
||||
if (!strcmp (bfd_get_section_name (input_bfd, input_section),
|
||||
".text") != 0 ||
|
||||
if (strcmp (bfd_get_section_name (input_bfd, input_section),
|
||||
".text") == 0 ||
|
||||
(info->shared
|
||||
&& ELF32_R_TYPE(outrel.r_info) != R_VAX_32
|
||||
&& ELF32_R_TYPE(outrel.r_info) != R_VAX_RELATIVE
|
||||
|
@ -2071,12 +2102,15 @@ elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
|
|||
#define TARGET_LITTLE_SYM bfd_elf32_vax_vec
|
||||
#define TARGET_LITTLE_NAME "elf32-vax"
|
||||
#define ELF_MACHINE_CODE EM_VAX
|
||||
#define ELF_MAXPAGESIZE 0x1000
|
||||
#define ELF_MAXPAGESIZE 0x10000
|
||||
|
||||
#define elf_backend_create_dynamic_sections \
|
||||
_bfd_elf_create_dynamic_sections
|
||||
#define bfd_elf32_bfd_link_hash_table_create \
|
||||
elf_vax_link_hash_table_create
|
||||
#define bfd_elf32_bfd_copy_private_bfd_data \
|
||||
elf32_vax_copy_private_bfd_data
|
||||
|
||||
#define bfd_elf32_bfd_final_link bfd_elf_gc_common_final_link
|
||||
|
||||
#define elf_backend_check_relocs elf_vax_check_relocs
|
||||
|
|
|
@ -99,10 +99,20 @@ bfd_boolean elf64_alpha_use_secureplt = FALSE;
|
|||
#define PLT_ENTRY_SIZE \
|
||||
(elf64_alpha_use_secureplt ? NEW_PLT_ENTRY_SIZE : OLD_PLT_ENTRY_SIZE)
|
||||
|
||||
/* ld --traditional-format uses this older format instead. */
|
||||
#define OLD_PLT_ENTRY_WORD1 0x279f0000 /* ldah $28, 0($31) */
|
||||
#define OLD_PLT_ENTRY_WORD2 0x239c0000 /* lda $28, 0($28) */
|
||||
#define OLD_PLT_ENTRY_WORD3 0xc3e00000 /* br $31, plt0 */
|
||||
|
||||
#define MAX_GOT_SIZE (64*1024)
|
||||
|
||||
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so"
|
||||
|
||||
/* Handle an Alpha specific section when reading an object file. This
|
||||
is called when elfcode.h finds a section with an unknown type.
|
||||
FIXME: We need to handle the SHF_ALPHA_GPREL flag, but I'm not sure
|
||||
how to. */
|
||||
|
||||
struct alpha_elf_link_hash_entry
|
||||
{
|
||||
struct elf_link_hash_entry root;
|
||||
|
@ -4719,6 +4729,32 @@ elf64_alpha_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
|
|||
plt_index = ((gotent->plt_offset - NEW_PLT_HEADER_SIZE)
|
||||
/ NEW_PLT_ENTRY_SIZE);
|
||||
}
|
||||
else if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
|
||||
{
|
||||
long hi, lo;
|
||||
|
||||
/* decompose the reloc offset for the plt for ldah+lda */
|
||||
hi = plt_index * sizeof(Elf64_External_Rela);
|
||||
lo = ((hi & 0xffff) ^ 0x8000) - 0x8000;
|
||||
hi = (hi - lo) >> 16;
|
||||
|
||||
insn = INSN_ABO (INSN_LDAH, 28, 31, hi);
|
||||
bfd_put_32 (output_bfd, insn,
|
||||
splt->contents + gotent->plt_offset);
|
||||
|
||||
insn = INSN_ABO (INSN_LDA, 28, 28, lo);
|
||||
bfd_put_32 (output_bfd, insn,
|
||||
splt->contents + gotent->plt_offset + 4);
|
||||
|
||||
disp = -(gotent->plt_offset + 12);
|
||||
insn = INSN_AD (INSN_BR, 31, disp);
|
||||
|
||||
bfd_put_32 (output_bfd, insn,
|
||||
splt->contents + gotent->plt_offset + 8);
|
||||
|
||||
plt_index = ((gotent->plt_offset - OLD_PLT_HEADER_SIZE)
|
||||
/ OLD_PLT_ENTRY_SIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
disp = -(gotent->plt_offset + 4);
|
||||
|
|
|
@ -9695,7 +9695,14 @@ elf_reloc_link_order (bfd *output_bfd,
|
|||
if (bed->s->arch_size == 32)
|
||||
irel[0].r_info = ELF32_R_INFO (indx, howto->type);
|
||||
else
|
||||
irel[0].r_info = ELF64_R_INFO (indx, howto->type);
|
||||
#ifdef BFD64
|
||||
{
|
||||
bfd_uint64_t indx64 = indx;
|
||||
irel[0].r_info = ELF64_R_INFO (indx64, howto->type);
|
||||
}
|
||||
#else
|
||||
BFD_FAIL();
|
||||
#endif
|
||||
|
||||
rel_hdr = &elf_section_data (output_section)->rel_hdr;
|
||||
erel = rel_hdr->contents;
|
||||
|
|
|
@ -829,6 +829,10 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
|||
"BFD_RELOC_68K_GLOB_DAT",
|
||||
"BFD_RELOC_68K_JMP_SLOT",
|
||||
"BFD_RELOC_68K_RELATIVE",
|
||||
"BFD_RELOC_VAX_GLOB_DAT",
|
||||
"BFD_RELOC_VAX_GLOB_REF",
|
||||
"BFD_RELOC_VAX_JMP_SLOT",
|
||||
"BFD_RELOC_VAX_RELATIVE",
|
||||
"BFD_RELOC_32_BASEREL",
|
||||
"BFD_RELOC_16_BASEREL",
|
||||
"BFD_RELOC_LO16_BASEREL",
|
||||
|
|
|
@ -1737,6 +1737,17 @@ ENUMX
|
|||
ENUMDOC
|
||||
Relocations used by 68K ELF.
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_VAX_GLOB_DAT
|
||||
ENUMX
|
||||
BFD_RELOC_VAX_GLOB_REF
|
||||
ENUMX
|
||||
BFD_RELOC_VAX_JMP_SLOT
|
||||
ENUMX
|
||||
BFD_RELOC_VAX_RELATIVE
|
||||
ENUMDOC
|
||||
Relocations used by VAX ELF.
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_32_BASEREL
|
||||
ENUMX
|
||||
|
|
|
@ -99,6 +99,11 @@ int newer_only = 0;
|
|||
if any of the members are object files. */
|
||||
int write_armap = 0;
|
||||
|
||||
/* Operate in deterministic mode: write zero for timestamps, uids,
|
||||
and gids for archive members and the archive symbol table, and write
|
||||
consistent file modes. */
|
||||
int deterministic = 0;
|
||||
|
||||
/* Nonzero means it's the name of an existing member; position new or moved
|
||||
files with respect to this one. */
|
||||
char *posname = NULL;
|
||||
|
@ -240,6 +245,7 @@ usage (int help)
|
|||
fprintf (s, _(" command specific modifiers:\n"));
|
||||
fprintf (s, _(" [a] - put file(s) after [member-name]\n"));
|
||||
fprintf (s, _(" [b] - put file(s) before [member-name] (same as [i])\n"));
|
||||
fprintf (s, _(" [D] - use zero for timestamps and uids/gids\n"));
|
||||
fprintf (s, _(" [N] - use instance [count] of name\n"));
|
||||
fprintf (s, _(" [f] - truncate inserted file names\n"));
|
||||
fprintf (s, _(" [P] - use full path names when matching\n"));
|
||||
|
@ -569,6 +575,9 @@ main (int argc, char **argv)
|
|||
case 'P':
|
||||
full_pathname = TRUE;
|
||||
break;
|
||||
case 'D':
|
||||
deterministic = TRUE;
|
||||
break;
|
||||
case 'T':
|
||||
make_thin_archive = TRUE;
|
||||
break;
|
||||
|
@ -622,6 +631,9 @@ main (int argc, char **argv)
|
|||
if (newer_only && operation != replace)
|
||||
fatal (_("`u' is only meaningful with the `r' option."));
|
||||
|
||||
if (newer_only && deterministic)
|
||||
fatal (_("`u' is not meaningful with the `D' option."));
|
||||
|
||||
if (postype != pos_default)
|
||||
posname = argv[arg_index++];
|
||||
|
||||
|
@ -972,6 +984,9 @@ write_archive (bfd *iarch)
|
|||
obfd->flags |= BFD_TRADITIONAL_FORMAT;
|
||||
}
|
||||
|
||||
if (deterministic)
|
||||
obfd->flags |= BFD_DETERMINISTIC_OUTPUT;
|
||||
|
||||
if (make_thin_archive || bfd_is_thin_archive (iarch))
|
||||
bfd_is_thin_archive (obfd) = 1;
|
||||
|
||||
|
|
|
@ -567,7 +567,14 @@ get_file_size (const char * file_name)
|
|||
file_name, strerror (errno));
|
||||
}
|
||||
else if (! S_ISREG (statbuf.st_mode))
|
||||
non_fatal (_("Warning: '%s' is not an ordinary file"), file_name);
|
||||
{
|
||||
if (!S_ISCHR(statbuf.st_mode))
|
||||
{
|
||||
non_fatal (_("Warning: '%s' is not an ordinary file"), file_name);
|
||||
return 0;
|
||||
}
|
||||
return statbuf.st_size ? statbuf.st_size : 1;
|
||||
}
|
||||
else
|
||||
return statbuf.st_size;
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@ TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
|
|||
|
||||
# Man page generation from texinfo
|
||||
addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_addr2line.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
|
||||
-($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -48,6 +50,8 @@ addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f addr2line.pod
|
||||
|
||||
ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_ar.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
|
||||
-($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -55,6 +59,8 @@ ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f ar.pod
|
||||
|
||||
dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_dlltool.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
|
||||
-($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -62,6 +68,8 @@ dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f dlltool.pod
|
||||
|
||||
nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_nlmconv.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
|
||||
-($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -69,6 +77,8 @@ nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f nlmconv.pod
|
||||
|
||||
nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_nm.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
|
||||
-($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -76,6 +86,8 @@ nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f nm.pod
|
||||
|
||||
objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_objcopy.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
|
||||
-($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -83,6 +95,8 @@ objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f objcopy.pod
|
||||
|
||||
objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_objdump.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
|
||||
-($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -90,6 +104,8 @@ objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f objdump.pod
|
||||
|
||||
ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_ranlib.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
|
||||
-($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -97,6 +113,8 @@ ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f ranlib.pod
|
||||
|
||||
readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_readelf.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
|
||||
-($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -104,6 +122,8 @@ readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f readelf.pod
|
||||
|
||||
size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_size.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
|
||||
-($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -111,6 +131,8 @@ size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f size.pod
|
||||
|
||||
strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_strings.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
|
||||
-($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -118,6 +140,8 @@ strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f strings.pod
|
||||
|
||||
strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_strip.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
|
||||
-($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -125,6 +149,8 @@ strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f strip.pod
|
||||
|
||||
windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_windres.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
|
||||
-($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -132,6 +158,8 @@ windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f windres.pod
|
||||
|
||||
windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_windmc.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
|
||||
-($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -139,6 +167,8 @@ windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f windmc.pod
|
||||
|
||||
cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_cxxfilt.man:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
|
||||
-($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
|
|
@ -595,6 +595,8 @@ uninstall-man: uninstall-man1
|
|||
|
||||
# Man page generation from texinfo
|
||||
addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_addr2line.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
|
||||
-($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -602,6 +604,8 @@ addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f addr2line.pod
|
||||
|
||||
ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_ar.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
|
||||
-($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -609,6 +613,8 @@ ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f ar.pod
|
||||
|
||||
dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_dlltool.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
|
||||
-($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -616,6 +622,8 @@ dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f dlltool.pod
|
||||
|
||||
nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_nlmconv.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
|
||||
-($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -623,6 +631,8 @@ nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f nlmconv.pod
|
||||
|
||||
nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_nm.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
|
||||
-($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -630,6 +640,8 @@ nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f nm.pod
|
||||
|
||||
objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_objcopy.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
|
||||
-($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -637,6 +649,8 @@ objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f objcopy.pod
|
||||
|
||||
objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_objdump.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
|
||||
-($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -644,6 +658,8 @@ objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f objdump.pod
|
||||
|
||||
ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_ranlib.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
|
||||
-($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -651,6 +667,8 @@ ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f ranlib.pod
|
||||
|
||||
readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_readelf.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
|
||||
-($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -658,6 +676,8 @@ readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f readelf.pod
|
||||
|
||||
size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_size.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
|
||||
-($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -665,6 +685,8 @@ size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f size.pod
|
||||
|
||||
strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_strings.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
|
||||
-($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -672,6 +694,8 @@ strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f strings.pod
|
||||
|
||||
strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_strip.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
|
||||
-($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -679,6 +703,8 @@ strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f strip.pod
|
||||
|
||||
windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_windres.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
|
||||
-($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -686,6 +712,8 @@ windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f windres.pod
|
||||
|
||||
windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_windmc.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
|
||||
-($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
@ -693,6 +721,8 @@ windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
|||
rm -f windmc.pod
|
||||
|
||||
cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_cxxfilt.man:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
|
||||
-($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
|
|
|
@ -304,6 +304,14 @@ member must be present as the \fIrelpos\fR argument, before the
|
|||
created if it did not exist, when you request an update. But a warning is
|
||||
issued unless you specify in advance that you expect to create it, by
|
||||
using this modifier.
|
||||
.IP "\fBD\fR" 4
|
||||
.IX Item "D"
|
||||
Operate in \fIdeterministic\fR mode. When adding files and the archive
|
||||
index use zero for UIDs, GIDs, timestamps, and use consistent file modes
|
||||
for all files. When this option is used, if \fBar\fR is used with
|
||||
identical options and identical input files, multiple runs will create
|
||||
identical output files regardless of the input files' owners, groups,
|
||||
file modes, or modification times.
|
||||
.IP "\fBf\fR" 4
|
||||
.IX Item "f"
|
||||
Truncate names in the archive. \s-1GNU\s0 \fBar\fR will normally permit file
|
||||
|
|
|
@ -396,6 +396,15 @@ created if it did not exist, when you request an update. But a warning is
|
|||
issued unless you specify in advance that you expect to create it, by
|
||||
using this modifier.
|
||||
|
||||
@item D
|
||||
@cindex deterministic archives
|
||||
Operate in @emph{deterministic} mode. When adding files and the archive
|
||||
index use zero for UIDs, GIDs, timestamps, and use consistent file modes
|
||||
for all files. When this option is used, if @command{ar} is used with
|
||||
identical options and identical input files, multiple runs will create
|
||||
identical output files regardless of the input files' owners, groups,
|
||||
file modes, or modification times.
|
||||
|
||||
@item f
|
||||
Truncate names in the archive. @sc{gnu} @command{ar} will normally permit file
|
||||
names of any length. This will cause it to create archives which are
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "fnmatch.h"
|
||||
#include "elf-bfd.h"
|
||||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
#include "libbfd.h"
|
||||
|
||||
struct is_specified_symbol_predicate_data
|
||||
|
|
|
@ -597,7 +597,7 @@ print_strings (const char *filename, FILE *stream, file_off address,
|
|||
else
|
||||
#elif !BFD_HOST_64BIT_LONG
|
||||
if (start != (unsigned long) start)
|
||||
printf ("++%7ld ", (unsigned long) start);
|
||||
printf ("++%7llu ", (unsigned long) start);
|
||||
else
|
||||
#endif
|
||||
printf ("%7ld ", (long) start);
|
||||
|
|
|
@ -279,7 +279,7 @@ case $basic_machine in
|
|||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh | sh[12345] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[12345]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
|
@ -362,8 +362,8 @@ case $basic_machine in
|
|||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sh-* | sh[12345]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[12345]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
|
|
|
@ -1074,6 +1074,154 @@ vax_reg_parse (char c1, char c2, char c3, char c4)
|
|||
return retval;
|
||||
}
|
||||
|
||||
#ifdef OBJ_AOUT
|
||||
#ifndef BFD_ASSEMBLER
|
||||
void
|
||||
tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
|
||||
char *where;
|
||||
fixS *fixP;
|
||||
relax_addressT segment_address_in_file;
|
||||
{
|
||||
/*
|
||||
* In: length of relocation (or of address) in chars: 1, 2 or 4.
|
||||
* Out: GNU LD relocation length code: 0, 1, or 2.
|
||||
*/
|
||||
|
||||
static const unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2};
|
||||
int r_symbolnum;
|
||||
int r_flags;
|
||||
|
||||
know (fixP->fx_addsy != NULL);
|
||||
|
||||
md_number_to_chars (where,
|
||||
fixP->fx_frag->fr_address + fixP->fx_where - segment_address_in_file,
|
||||
4);
|
||||
|
||||
r_symbolnum = (S_IS_DEFINED (fixP->fx_addsy)
|
||||
? S_GET_TYPE (fixP->fx_addsy)
|
||||
: fixP->fx_addsy->sy_number);
|
||||
r_flags = (fixP->fx_pcrel ? 1 : 0)
|
||||
| (!S_IS_DEFINED (fixP->fx_addsy) ? 8 : 0) /* extern */
|
||||
| ((nbytes_r_length[fixP->fx_size] & 3) << 1);
|
||||
|
||||
#if 0
|
||||
r_flags |= ((!S_IS_DEFINED(fixP->fx_addsy)
|
||||
&& fixP->fx_pcrel
|
||||
&& fixP->fx_addsy != GOT_symbol
|
||||
&& fixP->fx_addsy != PLT_symbol
|
||||
&& flags_want_pic) ? 0x10 : 0);
|
||||
#endif
|
||||
|
||||
switch (fixP->fx_r_type) {
|
||||
case NO_RELOC:
|
||||
break;
|
||||
case NO_RELOC2:
|
||||
if (r_flags & 8)
|
||||
r_flags |= 0x80; /* setting the copy bit */
|
||||
/* says we can convert */
|
||||
/* to gotslot if needed */
|
||||
break;
|
||||
case RELOC_32:
|
||||
if (flag_want_pic && S_IS_EXTERNAL(fixP->fx_addsy)) {
|
||||
r_symbolnum = fixP->fx_addsy->sy_number;
|
||||
r_flags |= 8; /* set extern bit */
|
||||
}
|
||||
break;
|
||||
case RELOC_JMP_SLOT:
|
||||
if (flag_want_pic) {
|
||||
r_flags |= 0x20; /* set jmptable */
|
||||
r_flags &= ~0x08; /* clear extern bit */
|
||||
}
|
||||
break;
|
||||
case RELOC_JMP_TBL:
|
||||
if (flag_want_pic) {
|
||||
r_flags |= 0x20; /* set jmptable */
|
||||
r_flags |= 0x08; /* set extern bit */
|
||||
}
|
||||
break;
|
||||
case RELOC_GLOB_DAT:
|
||||
if (flag_want_pic) {
|
||||
r_flags |= 0x10; /* set baserel bit */
|
||||
r_symbolnum = fixP->fx_addsy->sy_number;
|
||||
if (S_IS_EXTERNAL(fixP->fx_addsy))
|
||||
r_flags |= 8; /* set extern bit */
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
where[4] = (r_symbolnum >> 0) & 0xff;
|
||||
where[5] = (r_symbolnum >> 8) & 0xff;
|
||||
where[6] = (r_symbolnum >> 16) & 0xff;
|
||||
where[7] = r_flags;
|
||||
}
|
||||
#endif /* !BFD_ASSEMBLER */
|
||||
#endif /* OBJ_AOUT */
|
||||
|
||||
/*
|
||||
* BUGS, GRIPES, APOLOGIA, etc.
|
||||
*
|
||||
* The opcode table 'votstrs' needs to be sorted on opcode frequency.
|
||||
* That is, AFTER we hash it with hash_...(), we want most-used opcodes
|
||||
* to come out of the hash table faster.
|
||||
*
|
||||
* I am sorry to inflict yet another VAX assembler on the world, but
|
||||
* RMS says we must do everything from scratch, to prevent pin-heads
|
||||
* restricting this software.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This is a vaguely modular set of routines in C to parse VAX
|
||||
* assembly code using DEC mnemonics. It is NOT un*x specific.
|
||||
*
|
||||
* The idea here is that the assembler has taken care of all:
|
||||
* labels
|
||||
* macros
|
||||
* listing
|
||||
* pseudo-ops
|
||||
* line continuation
|
||||
* comments
|
||||
* condensing any whitespace down to exactly one space
|
||||
* and all we have to do is parse 1 line into a vax instruction
|
||||
* partially formed. We will accept a line, and deliver:
|
||||
* an error message (hopefully empty)
|
||||
* a skeleton VAX instruction (tree structure)
|
||||
* textual pointers to all the operand expressions
|
||||
* a warning message that notes a silly operand (hopefully empty)
|
||||
*/
|
||||
|
||||
/*
|
||||
* E D I T H I S T O R Y
|
||||
*
|
||||
* 17may86 Dean Elsner. Bug if line ends immediately after opcode.
|
||||
* 30apr86 Dean Elsner. New vip_op() uses arg block so change call.
|
||||
* 6jan86 Dean Elsner. Crock vip_begin() to call vip_op_defaults().
|
||||
* 2jan86 Dean Elsner. Invent synthetic opcodes.
|
||||
* Widen vax_opcodeT to 32 bits. Use a bit for VIT_OPCODE_SYNTHETIC,
|
||||
* which means this is not a real opcode, it is like a macro; it will
|
||||
* be relax()ed into 1 or more instructions.
|
||||
* Use another bit for VIT_OPCODE_SPECIAL if the op-code is not optimised
|
||||
* like a regular branch instruction. Option added to vip_begin():
|
||||
* exclude synthetic opcodes. Invent synthetic_votstrs[].
|
||||
* 31dec85 Dean Elsner. Invent vit_opcode_nbytes.
|
||||
* Also make vit_opcode into a char[]. We now have n-byte vax opcodes,
|
||||
* so caller's don't have to know the difference between a 1-byte & a
|
||||
* 2-byte op-code. Still need vax_opcodeT concept, so we know how
|
||||
* big an object must be to hold an op.code.
|
||||
* 30dec85 Dean Elsner. Widen typedef vax_opcodeT in "vax-inst.h"
|
||||
* because vax opcodes may be 16 bits. Our crufty C compiler was
|
||||
* happily initialising 8-bit vot_codes with 16-bit numbers!
|
||||
* (Wouldn't the 'phone company like to compress data so easily!)
|
||||
* 29dec85 Dean Elsner. New static table vax_operand_width_size[].
|
||||
* Invented so we know hw many bytes a "I^#42" needs in its immediate
|
||||
* operand. Revised struct vop in "vax-inst.h": explicitly include
|
||||
* byte length of each operand, and it's letter-code datum type.
|
||||
* 17nov85 Dean Elsner. Name Change.
|
||||
* Due to ar(1) truncating names, we learned the hard way that
|
||||
* "vax-inst-parse.c" -> "vax-inst-parse." dropping the "o" off
|
||||
* the archived object name. SO... we shortened the name of this
|
||||
* source file, and changed the makefile.
|
||||
*/
|
||||
|
||||
/* Parse a vax operand in DEC assembler notation.
|
||||
For speed, expect a string of whitespace to be reduced to a single ' '.
|
||||
This is the case for GNU AS, and is easy for other DEC-compatible
|
||||
|
@ -3168,7 +3316,8 @@ md_assemble (char *instruction_string)
|
|||
min (sizeof (valueT),
|
||||
(size_t) nbytes));
|
||||
if ((size_t) nbytes > sizeof (valueT))
|
||||
memset (p + 5, '\0', nbytes - sizeof (valueT));
|
||||
memset (p + 1 + sizeof (valueT), '\0',
|
||||
nbytes - sizeof (valueT));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -54,6 +54,14 @@ void vax_cons (expressionS *, int);
|
|||
void vax_cons_fix_new (struct frag *, int, unsigned int, struct expressionS *);
|
||||
#endif
|
||||
|
||||
#ifdef OBJ_ELF
|
||||
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) vax_cons (EXP, NBYTES)
|
||||
#define TC_CONS_FIX_NEW vax_cons_fix_new
|
||||
void vax_cons PARAMS ((expressionS *, int));
|
||||
void vax_cons_fix_new
|
||||
PARAMS ((struct frag *, int, unsigned int, struct expressionS *));
|
||||
#endif
|
||||
|
||||
extern const struct relax_type md_relax_table[];
|
||||
#define TC_GENERIC_RELAX_TABLE md_relax_table
|
||||
|
||||
|
|
|
@ -65,6 +65,8 @@ typedef long vax_opcodeT; /* For initialising array of opcodes */
|
|||
#define VAX_WIDEN_WORD (0x20) /* Add this to byte branch to get word br. */
|
||||
#define VAX_WIDEN_LONG (0x6) /* Add this to byte branch to get long jmp.*/
|
||||
/* Needs VAX_PC_RELATIVE_MODE byte after it*/
|
||||
#define VAX_CALLS (0xFB) /* Call with arg list on stack */
|
||||
#define VAX_CALLG (0xFA) /* Call with arg list in memory */
|
||||
|
||||
struct vit /* vax instruction tree */
|
||||
{
|
||||
|
|
|
@ -24,6 +24,8 @@ TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
|
|||
-I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc
|
||||
|
||||
asconfig.texi: $(CONFIG).texi
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_asconfig.text:
|
||||
rm -f asconfig.texi
|
||||
cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
|
||||
chmod u+w ./asconfig.texi
|
||||
|
@ -111,6 +113,8 @@ info-local: $(MANS)
|
|||
# The sed command removes the no-adjust Nroff command so that
|
||||
# the man output looks standard.
|
||||
as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_as.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
|
||||
-($(POD2MAN) as.pod | \
|
||||
|
|
|
@ -603,6 +603,8 @@ uninstall-man: uninstall-man1
|
|||
|
||||
|
||||
asconfig.texi: $(CONFIG).texi
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_asconfig.texi:
|
||||
rm -f asconfig.texi
|
||||
cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
|
||||
chmod u+w ./asconfig.texi
|
||||
|
@ -639,6 +641,8 @@ info-local: $(MANS)
|
|||
# The sed command removes the no-adjust Nroff command so that
|
||||
# the man output looks standard.
|
||||
as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_as.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
|
||||
-($(POD2MAN) as.pod | \
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include "corefile.h"
|
||||
#include "safe-ctype.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
bfd *core_bfd;
|
||||
static int core_num_syms;
|
||||
static asymbol **core_syms;
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
|
||||
static void usage (FILE *, int) ATTRIBUTE_NORETURN;
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
const char *whoami;
|
||||
const char *function_mapping_file;
|
||||
const char *a_out_name = A_OUTNAME;
|
||||
|
|
|
@ -397,6 +397,10 @@ struct bfd_link_info
|
|||
option). If this is NULL, no symbols are being wrapped. */
|
||||
struct bfd_hash_table *wrap_hash;
|
||||
|
||||
/* Hash table of symbols which may be left unresolved during
|
||||
a link. If this is NULL, no symbols can be left unresolved. */
|
||||
struct bfd_hash_table *ignore_hash;
|
||||
|
||||
/* The output BFD. */
|
||||
bfd *output_bfd;
|
||||
|
||||
|
|
|
@ -1809,6 +1809,8 @@ bootstrap: ld3$(EXEEXT)
|
|||
# because almost all configs use "gen" version of manual.
|
||||
# Set DOCVER above to change.
|
||||
configdoc.texi: ${DOCVER}-doc.texi
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_configdoc.texi:
|
||||
cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
|
||||
chmod u+w ./configdoc.texi
|
||||
|
||||
|
@ -1816,6 +1818,8 @@ configdoc.texi: ${DOCVER}-doc.texi
|
|||
# The sed command removes the no-adjust Nroff command so that
|
||||
# the man output looks standard.
|
||||
ld.1: $(srcdir)/ld.texinfo configdoc.texi
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_ld.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
|
||||
-($(POD2MAN) ld.pod | \
|
||||
|
@ -1966,17 +1970,17 @@ dep.sed: dep-in.sed config.status
|
|||
dep: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
|
||||
cat DEP >> tmp-Makefile
|
||||
$(srcdir)/../move-if-change tmp-Makefile Makefile
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
|
||||
|
||||
dep-in: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
|
||||
cat DEP >> tmp-Makefile.in
|
||||
$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
|
||||
|
||||
dep-am: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
|
||||
cat DEP >> tmp-Makefile.am
|
||||
$(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
|
||||
|
||||
.PHONY: dep dep-in dep-am
|
||||
|
||||
|
|
|
@ -2630,6 +2630,8 @@ bootstrap: ld3$(EXEEXT)
|
|||
# because almost all configs use "gen" version of manual.
|
||||
# Set DOCVER above to change.
|
||||
configdoc.texi: ${DOCVER}-doc.texi
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_configdoc.texi:
|
||||
cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
|
||||
chmod u+w ./configdoc.texi
|
||||
|
||||
|
@ -2637,6 +2639,8 @@ configdoc.texi: ${DOCVER}-doc.texi
|
|||
# The sed command removes the no-adjust Nroff command so that
|
||||
# the man output looks standard.
|
||||
ld.1: $(srcdir)/ld.texinfo configdoc.texi
|
||||
@echo "NOT REBUILDING $@"
|
||||
NetBSD_DISABLED_ld.1:
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
|
||||
-($(POD2MAN) ld.pod | \
|
||||
|
@ -2758,17 +2762,17 @@ dep.sed: dep-in.sed config.status
|
|||
dep: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
|
||||
cat DEP >> tmp-Makefile
|
||||
$(srcdir)/../move-if-change tmp-Makefile Makefile
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
|
||||
|
||||
dep-in: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
|
||||
cat DEP >> tmp-Makefile.in
|
||||
$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
|
||||
|
||||
dep-am: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
|
||||
cat DEP >> tmp-Makefile.am
|
||||
$(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
|
||||
|
||||
.PHONY: dep dep-in dep-am
|
||||
|
||||
|
|
|
@ -85,6 +85,22 @@ case "${host}" in
|
|||
# No further tweaking needed
|
||||
;;
|
||||
|
||||
alpha*-*-netbsd* | mips*-*-netbsd* | sparc64-*-netbsd* | *-*-netbsdelf*)
|
||||
# The new BSD `make' has a bug: it doesn't pass empty arguments in
|
||||
# shell commands. So we need to make this value non-empty in order
|
||||
# for the genscripts.sh call to work. There's nothing magic about
|
||||
# the value `/lib'; it's just a dummy.
|
||||
NATIVE_LIB_DIRS=/lib
|
||||
HOSTING_CRT0='-dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crtbegin.o'
|
||||
HOSTING_LIBS="$HOSTING_LIBS /usr/lib/crtend.o"
|
||||
;;
|
||||
|
||||
*-*-netbsd*)
|
||||
# NetBSD non-ELF platforms.
|
||||
NATIVE_LIB_DIRS=/lib
|
||||
HOSTING_CRT0=/usr/lib/crt0.o
|
||||
;;
|
||||
|
||||
am33_2.0-*-linux*)
|
||||
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]\*,ld-linux,g"`
|
||||
;;
|
||||
|
|
|
@ -362,9 +362,18 @@ mips*-sgi-irix6*) targ_emul=elf32bmipn32
|
|||
mips*-sgi-irix*) targ_emul=mipsbig ;;
|
||||
mips*el-*-ecoff*) targ_emul=mipsidtl ;;
|
||||
mips*-*-ecoff*) targ_emul=mipsidt ;;
|
||||
mips64*el-*-netbsd*) targ_emul=elf64ltsmip
|
||||
targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32ltsmip elf32btsmipn32 elf32btsmip"
|
||||
;;
|
||||
mips64*-*-netbsd*) targ_emul=elf64btsmip
|
||||
targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32btsmip elf32ltsmipn32 elf32ltsmip"
|
||||
;;
|
||||
mips*el-*-netbsd*) targ_emul=elf32ltsmip
|
||||
targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
|
||||
;;
|
||||
mips*-*-netbsd*) targ_emul=elf32btsmip
|
||||
targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
;;
|
||||
mips*-*-netbsd*) targ_emul=elf32btsmip
|
||||
targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
;;
|
||||
|
@ -580,10 +589,15 @@ sparc*-*-linux-*) targ_emul=elf32_sparc
|
|||
tdir_sparclinux=${targ_alias}aout
|
||||
tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
|
||||
tdir_sun4=sparc-sun-sunos4 ;;
|
||||
sparc64-*-netbsd* | sparc64-*-openbsd*)
|
||||
targ_emul=elf64_sparc
|
||||
targ_extra_emuls="elf32_sparc" ;;
|
||||
sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;;
|
||||
sparc64-*-netbsd*) targ_emul=elf64_sparc
|
||||
targ_extra_emuls="elf32_sparc sparcnbsd"
|
||||
;;
|
||||
sparc64-*-openbsd*) targ_emul=elf64_sparc
|
||||
targ_extra_emuls="elf32_sparc"
|
||||
;;
|
||||
sparc*-*-netbsd*elf*) targ_emul=elf32_sparc
|
||||
targ_extra_emuls=sparcnbsd
|
||||
;;
|
||||
sparc*-*-netbsd*) targ_emul=sparcnbsd ;;
|
||||
sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
|
||||
targ_emul=elf32_sparc ;;
|
||||
|
|
|
@ -3,5 +3,6 @@ MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
|
|||
TEXT_START_ADDR=0x00008000
|
||||
TARGET2_TYPE=got-rel
|
||||
|
||||
unset DATA_START_SYMBOLS
|
||||
unset STACK_ADDR
|
||||
unset EMBEDDED
|
||||
|
|
|
@ -12,5 +12,6 @@ MACHINE=
|
|||
TEMPLATE_NAME=elf32
|
||||
DATA_PLT=
|
||||
GENERATE_SHLIB_SCRIPT=yes
|
||||
#ELFSIZE=32
|
||||
GENERATE_PIE_SCRIPT=yes
|
||||
NO_SMALL_DATA=yes
|
||||
|
|
|
@ -1,2 +1,8 @@
|
|||
. ${srcdir}/emulparams/elf64alpha.sh
|
||||
ENTRY=__start
|
||||
|
||||
NOP=0x47ff041f
|
||||
# XXX binutils 2.13
|
||||
# Note that the number is always big-endian, thus we have to
|
||||
# reverse the digit string.
|
||||
#NOP=0x0000fe2f1f04ff47 # unop; nop
|
||||
|
|
|
@ -8,6 +8,7 @@ MACHINE=
|
|||
NOP=0x90909090
|
||||
TEMPLATE_NAME=elf32
|
||||
GENERATE_SHLIB_SCRIPT=yes
|
||||
#ELFSIZE=32
|
||||
GENERATE_PIE_SCRIPT=yes
|
||||
NO_SMALL_DATA=yes
|
||||
SEPARATE_GOTPLT=12
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# If you change this file, please also look at files which source this one:
|
||||
# hppanbsd.sh
|
||||
# hppanbsd.sh hppaobsd.sh
|
||||
|
||||
SCRIPT_NAME=elf
|
||||
ELFSIZE=32
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
. ${srcdir}/emulparams/hppanbsd.sh
|
||||
. ${srcdir}/emulparams/hppalinux.sh
|
||||
|
||||
OUTPUT_FORMAT="elf32-hppa"
|
||||
TEXT_START_ADDR=0x1000
|
||||
|
|
|
@ -9,5 +9,6 @@ NOP=0x4e754e75
|
|||
TEMPLATE_NAME=elf32
|
||||
EXTRA_EM_FILE=m68kelf
|
||||
GENERATE_SHLIB_SCRIPT=yes
|
||||
ELFSIZE=32
|
||||
GENERATE_PIE_SCRIPT=yes
|
||||
NO_SMALL_DATA=yes
|
||||
NO_SMALL_DATA=yes
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
. ${srcdir}/emulparams/m68kelf.sh
|
||||
TEXT_START_ADDR=0x2000
|
||||
TARGET_PAGE_SIZE=0x2000
|
||||
MACHINE=
|
||||
NONPAGED_TEXT_START_ADDR=${TEXT_START_ADDR}
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
SCRIPT_NAME=sh
|
||||
OUTPUT_FORMAT="coff-sh"
|
||||
TEXT_START_ADDR=0x8000
|
||||
TARGET_PAGE_SIZE=128
|
||||
TEXT_START_ADDR=0x1000
|
||||
TARGET_PAGE_SIZE=0x1000
|
||||
ARCH=sh
|
||||
|
|
|
@ -9,7 +9,11 @@ MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
|
|||
|
||||
DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
|
||||
|
||||
ENTRY=_start
|
||||
ENTRY=__start
|
||||
|
||||
unset EMBEDDED
|
||||
unset OTHER_SECTIONS
|
||||
|
||||
OTHER_READWRITE_SECTIONS='
|
||||
.note.ABI-tag : { *(.note.ABI-tag) }
|
||||
'
|
||||
|
|
|
@ -1779,7 +1779,8 @@ gld${EMULATION_NAME}_place_orphan (asection *s)
|
|||
|| (!iself && CONST_STRNEQ (secname, ".rel")))
|
||||
&& (s->flags & SEC_LOAD) != 0)
|
||||
place = &hold[orphan_rel];
|
||||
else if ((s->flags & SEC_CODE) == 0)
|
||||
else if ((s->flags & SEC_CODE) == 0
|
||||
&& hold[orphan_rodata].os != NULL)
|
||||
place = &hold[orphan_rodata];
|
||||
else
|
||||
place = &hold[orphan_text];
|
||||
|
|
|
@ -1139,7 +1139,7 @@ option also implies @option{--unresolved-symbols=report-all}. This
|
|||
option can be used with @option{-shared}. Doing so means that a
|
||||
shared library is being created but that all of the library's external
|
||||
references must be resolved by pulling in entries from static
|
||||
libraries.
|
||||
libraries.
|
||||
|
||||
@kindex -Bsymbolic
|
||||
@item -Bsymbolic
|
||||
|
|
|
@ -682,6 +682,23 @@ add_ysym (const char *name)
|
|||
einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
|
||||
}
|
||||
|
||||
void
|
||||
add_ignoresym (const char *name)
|
||||
{
|
||||
if (link_info.ignore_hash == NULL)
|
||||
{
|
||||
link_info.ignore_hash = xmalloc (sizeof (struct bfd_hash_table));
|
||||
if (! bfd_hash_table_init_n (link_info.ignore_hash,
|
||||
bfd_hash_newfunc,
|
||||
sizeof (struct bfd_hash_entry),
|
||||
61))
|
||||
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
|
||||
}
|
||||
|
||||
if (bfd_hash_lookup (link_info.ignore_hash, name, TRUE, TRUE) == NULL)
|
||||
einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
|
||||
}
|
||||
|
||||
/* Record a symbol to be wrapped, from the --wrap option. */
|
||||
|
||||
void
|
||||
|
@ -1169,7 +1186,7 @@ warning_find_reloc (bfd *abfd, asection *sec, void *iarg)
|
|||
/* This is called when an undefined symbol is found. */
|
||||
|
||||
static bfd_boolean
|
||||
undefined_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
undefined_symbol (struct bfd_link_info *info,
|
||||
const char *name,
|
||||
bfd *abfd,
|
||||
asection *section,
|
||||
|
@ -1181,23 +1198,25 @@ undefined_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
|||
|
||||
#define MAX_ERRORS_IN_A_ROW 5
|
||||
|
||||
if (info->ignore_hash != NULL
|
||||
&& bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL)
|
||||
return TRUE;
|
||||
|
||||
if (config.warn_once)
|
||||
{
|
||||
static struct bfd_hash_table *hash;
|
||||
|
||||
/* Only warn once about a particular undefined symbol. */
|
||||
if (hash == NULL)
|
||||
if (info->ignore_hash == NULL)
|
||||
{
|
||||
hash = xmalloc (sizeof (struct bfd_hash_table));
|
||||
if (!bfd_hash_table_init (hash, bfd_hash_newfunc,
|
||||
info->ignore_hash = xmalloc (sizeof (struct bfd_hash_table));
|
||||
if (! bfd_hash_table_init (info->ignore_hash, bfd_hash_newfunc,
|
||||
sizeof (struct bfd_hash_entry)))
|
||||
einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
|
||||
}
|
||||
|
||||
if (bfd_hash_lookup (hash, name, FALSE, FALSE) != NULL)
|
||||
if (bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL)
|
||||
return TRUE;
|
||||
|
||||
if (bfd_hash_lookup (hash, name, TRUE, TRUE) == NULL)
|
||||
if (bfd_hash_lookup (info->ignore_hash, name, TRUE, TRUE) == NULL)
|
||||
einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ extern int overflow_cutoff_limit;
|
|||
|
||||
extern void add_ysym (const char *);
|
||||
extern void add_wrap (const char *);
|
||||
extern void add_ignoresym (const char *);
|
||||
extern void add_keepsyms_file (const char *);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -163,7 +163,8 @@ enum option_values
|
|||
OPTION_ERROR_UNRESOLVED_SYMBOLS,
|
||||
OPTION_WARN_SHARED_TEXTREL,
|
||||
OPTION_REDUCE_MEMORY_OVERHEADS,
|
||||
OPTION_DEFAULT_SCRIPT
|
||||
OPTION_DEFAULT_SCRIPT,
|
||||
OPTION_IGNORE_UNRESOLVED_SYMBOL
|
||||
};
|
||||
|
||||
/* The long options. This structure is used for both the option
|
||||
|
@ -471,7 +472,7 @@ static const struct ld_option ld_options[] =
|
|||
ONE_DASH },
|
||||
{ {"shared", no_argument, NULL, OPTION_SHARED},
|
||||
'\0', NULL, N_("Create a shared library"), ONE_DASH },
|
||||
{ {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */
|
||||
{ {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD, NetBSD. */
|
||||
'\0', NULL, NULL, ONE_DASH },
|
||||
{ {"pie", no_argument, NULL, OPTION_PIE},
|
||||
'\0', NULL, N_("Create a position independent executable"), ONE_DASH },
|
||||
|
@ -561,8 +562,14 @@ static const struct ld_option ld_options[] =
|
|||
{ {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
|
||||
'\0', NULL, N_("Include all objects from following archives"),
|
||||
TWO_DASHES },
|
||||
{ {"Bforcearchive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
|
||||
'\0', NULL, NULL, TWO_DASHES }, /* NetBSD. */
|
||||
{ {"wrap", required_argument, NULL, OPTION_WRAP},
|
||||
'\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
|
||||
{ {"ignore-unresolved-symbol", required_argument, NULL,
|
||||
OPTION_IGNORE_UNRESOLVED_SYMBOL},
|
||||
'\0', N_("SYMBOL"),
|
||||
N_("Unresolved SYMBOL will not cause an error or warning"), TWO_DASHES },
|
||||
};
|
||||
|
||||
#define OPTION_COUNT ARRAY_SIZE (ld_options)
|
||||
|
@ -1370,6 +1377,9 @@ parse_args (unsigned argc, char **argv)
|
|||
case OPTION_WRAP:
|
||||
add_wrap (optarg);
|
||||
break;
|
||||
case OPTION_IGNORE_UNRESOLVED_SYMBOL:
|
||||
add_ignoresym (optarg);
|
||||
break;
|
||||
case OPTION_DISCARD_NONE:
|
||||
link_info.discard = discard_none;
|
||||
break;
|
||||
|
|
|
@ -6,16 +6,13 @@ TORS=".tors :
|
|||
___dtors = . ;
|
||||
*(.dtors)
|
||||
___dtors_end = . ;
|
||||
} > ram"
|
||||
}"
|
||||
|
||||
|
||||
cat <<EOF
|
||||
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
|
||||
OUTPUT_ARCH(${ARCH})
|
||||
|
||||
MEMORY
|
||||
{
|
||||
ram : o = 0x1000, l = 512k
|
||||
}
|
||||
${LIB_SEARCH_DIRS}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
|
@ -24,9 +21,9 @@ SECTIONS
|
|||
*(.text)
|
||||
*(.strings)
|
||||
${RELOCATING+ _etext = . ; }
|
||||
} ${RELOCATING+ > ram}
|
||||
}
|
||||
${CONSTRUCTING+${TORS}}
|
||||
.data :
|
||||
.data ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
|
||||
{
|
||||
*(.data)
|
||||
${RELOCATING+*(.gcc_exc*)}
|
||||
|
@ -35,19 +32,19 @@ SECTIONS
|
|||
${RELOCATING+___EH_FRAME_END__ = . ;}
|
||||
${RELOCATING+LONG(0);}
|
||||
${RELOCATING+ _edata = . ; }
|
||||
} ${RELOCATING+ > ram}
|
||||
.bss :
|
||||
}
|
||||
.bss ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
|
||||
{
|
||||
${RELOCATING+ _bss_start = . ; }
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
${RELOCATING+ _end = . ; }
|
||||
} ${RELOCATING+ > ram}
|
||||
.stack ${RELOCATING+ 0x30000 } :
|
||||
}
|
||||
.stack :
|
||||
{
|
||||
${RELOCATING+ _stack = . ; }
|
||||
*(.stack)
|
||||
} ${RELOCATING+ > ram}
|
||||
}
|
||||
.stab 0 ${RELOCATING+(NOLOAD)} :
|
||||
{
|
||||
*(.stab)
|
||||
|
|
|
@ -347,7 +347,7 @@ static const struct error_info error_table[] =
|
|||
ENTRY(EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket"),
|
||||
#endif
|
||||
#if defined (ENOPROTOOPT)
|
||||
ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol not available"),
|
||||
ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol option not available"),
|
||||
#endif
|
||||
#if defined (EPROTONOSUPPORT)
|
||||
ENTRY(EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported"),
|
||||
|
|
|
@ -633,17 +633,17 @@ dep.sed: dep-in.sed config.status
|
|||
dep: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
|
||||
cat DEP >> tmp-Makefile
|
||||
$(srcdir)/../move-if-change tmp-Makefile Makefile
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
|
||||
|
||||
dep-in: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
|
||||
cat DEP >> tmp-Makefile.in
|
||||
$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
|
||||
|
||||
dep-am: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
|
||||
cat DEP >> tmp-Makefile.am
|
||||
$(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
|
||||
|
||||
.PHONY: dep dep-in dep-am
|
||||
|
||||
|
|
|
@ -1185,17 +1185,17 @@ dep.sed: dep-in.sed config.status
|
|||
dep: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
|
||||
cat DEP >> tmp-Makefile
|
||||
$(srcdir)/../move-if-change tmp-Makefile Makefile
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
|
||||
|
||||
dep-in: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
|
||||
cat DEP >> tmp-Makefile.in
|
||||
$(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
|
||||
|
||||
dep-am: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
|
||||
cat DEP >> tmp-Makefile.am
|
||||
$(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
|
||||
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
|
||||
|
||||
.PHONY: dep dep-in dep-am
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ shift ; options=$9
|
|||
shift ; extrafiles=$9
|
||||
|
||||
rootdir=${srcdir}/..
|
||||
move_if_change="${CONFIG_SHELL:-/bin/sh} ${rootdir}/move-if-change"
|
||||
|
||||
# $arch is $6, as passed on the command line.
|
||||
# $ARCH is the same argument but in all uppercase.
|
||||
|
@ -111,41 +112,41 @@ opcodes)
|
|||
|
||||
# Customise generated files for the particular architecture.
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" < tmp-desc.h1 > tmp-desc.h
|
||||
${rootdir}/move-if-change tmp-desc.h ${srcdir}/${prefix}-desc.h
|
||||
${move_if_change} tmp-desc.h ${srcdir}/${prefix}-desc.h
|
||||
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" < tmp-desc.c1 > tmp-desc.c
|
||||
${rootdir}/move-if-change tmp-desc.c ${srcdir}/${prefix}-desc.c
|
||||
${move_if_change} tmp-desc.c ${srcdir}/${prefix}-desc.c
|
||||
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" < tmp-opc.h1 > tmp-opc.h
|
||||
${rootdir}/move-if-change tmp-opc.h ${srcdir}/${prefix}-opc.h
|
||||
${move_if_change} tmp-opc.h ${srcdir}/${prefix}-opc.h
|
||||
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" < tmp-opc.c1 > tmp-opc.c
|
||||
${rootdir}/move-if-change tmp-opc.c ${srcdir}/${prefix}-opc.c
|
||||
${move_if_change} tmp-opc.c ${srcdir}/${prefix}-opc.c
|
||||
|
||||
case $extrafiles in
|
||||
*opinst*)
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" < tmp-opinst.c1 >tmp-opinst.c
|
||||
${rootdir}/move-if-change tmp-opinst.c ${srcdir}/${prefix}-opinst.c
|
||||
${move_if_change} tmp-opinst.c ${srcdir}/${prefix}-opinst.c
|
||||
;;
|
||||
esac
|
||||
|
||||
cat ${srcdir}/cgen-ibld.in tmp-ibld.in1 | \
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" > tmp-ibld.c
|
||||
${rootdir}/move-if-change tmp-ibld.c ${srcdir}/${prefix}-ibld.c
|
||||
${move_if_change} tmp-ibld.c ${srcdir}/${prefix}-ibld.c
|
||||
|
||||
sed -e "/ -- assembler routines/ r tmp-asm.in1" ${srcdir}/cgen-asm.in \
|
||||
| sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" > tmp-asm.c
|
||||
${rootdir}/move-if-change tmp-asm.c ${srcdir}/${prefix}-asm.c
|
||||
${move_if_change} tmp-asm.c ${srcdir}/${prefix}-asm.c
|
||||
|
||||
sed -e "/ -- disassembler routines/ r tmp-dis.in1" ${srcdir}/cgen-dis.in \
|
||||
| sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" > tmp-dis.c
|
||||
${rootdir}/move-if-change tmp-dis.c ${srcdir}/${prefix}-dis.c
|
||||
${move_if_change} tmp-dis.c ${srcdir}/${prefix}-dis.c
|
||||
|
||||
# Remove temporary files.
|
||||
rm -f tmp-desc.h1 tmp-desc.c1
|
||||
|
|
|
@ -11869,6 +11869,14 @@ if test x${all_targets} = xfalse ; then
|
|||
# specified, as in sh3-elf, sh3b-linux-gnu, etc.
|
||||
# Include it just for ELF targets, since the SH5 bfd:s are ELF only.
|
||||
for t in $target $canon_targets; do
|
||||
# For NetBSD we do NOT want SH5 support unless sh5 or sh64
|
||||
# is specified
|
||||
case $t in
|
||||
sh5*-* | sh64*-*) # let the case below handle it
|
||||
;;
|
||||
sh*-*-netbsd* | sh*l*-*-netbsd*)
|
||||
continue ;;
|
||||
esac
|
||||
case $t in
|
||||
all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
|
||||
sh-*-linux* | shl-*-linux*)
|
||||
|
|
|
@ -229,6 +229,14 @@ if test x${all_targets} = xfalse ; then
|
|||
# specified, as in sh3-elf, sh3b-linux-gnu, etc.
|
||||
# Include it just for ELF targets, since the SH5 bfd:s are ELF only.
|
||||
for t in $target $canon_targets; do
|
||||
# For NetBSD we do NOT want SH5 support unless sh5 or sh64
|
||||
# is specified
|
||||
case $t in
|
||||
sh5*-* | sh64*-*) # let the case below handle it
|
||||
;;
|
||||
sh*-*-netbsd* | sh*l*-*-netbsd*)
|
||||
continue ;;
|
||||
esac
|
||||
case $t in
|
||||
all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
|
||||
sh-*-linux* | shl-*-linux*)
|
||||
|
|
|
@ -957,7 +957,7 @@ print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
|
|||
call _printf
|
||||
or %o1, %lo(_foo), %o1 */
|
||||
|
||||
if (is_delayed_branch (prev_insn))
|
||||
if (memaddr >= 8 && is_delayed_branch (prev_insn))
|
||||
{
|
||||
if (memaddr >= 8)
|
||||
errcode = (*info->read_memory_func)
|
||||
|
|
Loading…
Reference in New Issue