projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use bfd_get_filename throughout ld
[deliverable/binutils-gdb.git]
/
ld
/
emultempl
/
beos.em
diff --git
a/ld/emultempl/beos.em
b/ld/emultempl/beos.em
index bf75c5450a51400f32b0169ccb36458f777debd9..4da5eeef6d2376eb93269ce243d1dbecf9382660 100644
(file)
--- a/
ld/emultempl/beos.em
+++ b/
ld/emultempl/beos.em
@@
-7,7
+7,7
@@
else
fi
fragment <<EOF
/* This file is part of GLD, the Gnu Linker.
fi
fragment <<EOF
/* This file is part of GLD, the Gnu Linker.
- Copyright (C) 1995-20
19
Free Software Foundation, Inc.
+ Copyright (C) 1995-20
20
Free Software Foundation, Inc.
This file is part of the GNU Binutils.
This file is part of the GNU Binutils.
@@
-37,6
+37,7
@@
fragment <<EOF
#include "sysdep.h"
#include "bfd.h"
#include "bfdlink.h"
#include "sysdep.h"
#include "bfd.h"
#include "bfdlink.h"
+#include "ctf-api.h"
#include "getopt.h"
#include "libiberty.h"
#include "filenames.h"
#include "getopt.h"
#include "libiberty.h"
#include "filenames.h"
@@
-393,17
+394,19
@@
gld_${EMULATION_NAME}_after_open (void)
static int
sort_by_file_name (const void *a, const void *b)
{
static int
sort_by_file_name (const void *a, const void *b)
{
- const lang_statement_union_type *const *ra = a;
- const lang_statement_union_type *const *rb = b;
+ const lang_input_section_type *const *ra = a;
+ const lang_input_section_type *const *rb = b;
+ asection *sa = (*ra)->section;
+ asection *sb = (*rb)->section;
int i, a_sec, b_sec;
int i, a_sec, b_sec;
- i = filename_cmp (
(*ra)->input_section.section->owner->my_archive->filename
,
-
(*rb)->input_section.section->owner->my_archive->filename
);
+ i = filename_cmp (
bfd_get_filename (sa->owner->my_archive)
,
+
bfd_get_filename (sb->owner->my_archive)
);
if (i != 0)
return i;
if (i != 0)
return i;
- i = filename_cmp (
(*ra)->input_section.section->owner->filename
,
-
(*rb)->input_section.section->owner->filename
);
+ i = filename_cmp (
bfd_get_filename (sa->owner)
,
+
bfd_get_filename (sb->owner)
);
if (i != 0)
return i;
/* the tail idata4/5 are the only ones without relocs to an
if (i != 0)
return i;
/* the tail idata4/5 are the only ones without relocs to an
@@
-412,36
+415,29
@@
sort_by_file_name (const void *a, const void *b)
and HNT properly. if no reloc this one is import by ordinal
so we have to sort by section contents */
and HNT properly. if no reloc this one is import by ordinal
so we have to sort by section contents */
- if ((*ra)->input_section.section->reloc_count
- + (*rb)->input_section.section->reloc_count)
+ if (sa->reloc_count + sb->reloc_count != 0)
{
{
- i = ((*ra)->input_section.section->reloc_count
- > (*rb)->input_section.section->reloc_count) ? -1 : 0;
+ i = sa->reloc_count > sb->reloc_count ? -1 : 0;
if (i != 0)
return i;
if (i != 0)
return i;
- return ((*ra)->input_section.section->reloc_count
- > (*rb)->input_section.section->reloc_count) ? 0 : 1;
+ return sa->reloc_count > sb->reloc_count ? 0 : 1;
}
else
{
/* don't sort .idata$6 or .idata$7 FIXME dlltool eliminate .idata$7 */
}
else
{
/* don't sort .idata$6 or .idata$7 FIXME dlltool eliminate .idata$7 */
- if ((strcmp (
(*ra)->input_section.section
->name, ".idata$6") == 0))
+ if ((strcmp (
sa
->name, ".idata$6") == 0))
return 0;
return 0;
- if (!bfd_get_section_contents ((*ra)->input_section.section->owner,
- (*ra)->input_section.section, &a_sec,
- (file_ptr) 0,
- (bfd_size_type) sizeof(a_sec)))
+ if (!bfd_get_section_contents (sa->owner, sa, &a_sec, (file_ptr) 0,
+ (bfd_size_type) sizeof (a_sec)))
einfo (_("%F%P: %pB: can't read contents of section .idata: %E\n"),
einfo (_("%F%P: %pB: can't read contents of section .idata: %E\n"),
-
(*ra)->input_section.section
->owner);
+
sa
->owner);
- if (!bfd_get_section_contents ((*rb)->input_section.section->owner,
- (*rb)->input_section.section, &b_sec,
- (file_ptr) 0,
- (bfd_size_type) sizeof(b_sec)))
+ if (!bfd_get_section_contents (sb->owner, sb, &b_sec, (file_ptr) 0,
+ (bfd_size_type) sizeof (b_sec)))
einfo (_("%F%P: %pB: can't read contents of section .idata: %E\n"),
einfo (_("%F%P: %pB: can't read contents of section .idata: %E\n"),
-
(*rb)->input_section.section
->owner);
+
sb
->owner);
i = a_sec < b_sec ? -1 : 0;
if (i != 0)
i = a_sec < b_sec ? -1 : 0;
if (i != 0)
@@
-454,18
+450,19
@@
sort_by_file_name (const void *a, const void *b)
static int
sort_by_section_name (const void *a, const void *b)
{
static int
sort_by_section_name (const void *a, const void *b)
{
- const lang_statement_union_type *const *ra = a;
- const lang_statement_union_type *const *rb = b;
+ const lang_input_section_type *const *ra = a;
+ const lang_input_section_type *const *rb = b;
+ const char *sna = (*ra)->section->name;
+ const char *snb = (*rb)->section->name;
int i;
int i;
- i = strcmp ((*ra)->input_section.section->name,
- (*rb)->input_section.section->name);
+ i = strcmp (sna, snb);
/* This is a hack to make .stab and .stabstr last, so we don't have
to fix strip/objcopy for .reloc sections.
FIXME stripping images with a .rsrc section still needs to be fixed. */
if (i != 0)
{
/* This is a hack to make .stab and .stabstr last, so we don't have
to fix strip/objcopy for .reloc sections.
FIXME stripping images with a .rsrc section still needs to be fixed. */
if (i != 0)
{
- if ((CONST_STRNEQ (
(*ra)->input_section.section->name
, ".stab"))
- && (!
CONST_STRNEQ ((*rb)->input_section.section->name
, ".stab")))
+ if ((CONST_STRNEQ (
sna
, ".stab"))
+ && (!
CONST_STRNEQ (snb
, ".stab")))
return 1;
}
return i;
return 1;
}
return i;
@@
-767,6
+764,7
@@
struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
after_parse_default,
gld_${EMULATION_NAME}_after_open,
after_check_relocs_default,
after_parse_default,
gld_${EMULATION_NAME}_after_open,
after_check_relocs_default,
+ before_place_orphans_default,
after_allocation_default,
set_output_arch_default,
ldemul_default_target,
after_allocation_default,
set_output_arch_default,
ldemul_default_target,
@@
-787,6
+785,9
@@
struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
NULL, /* recognized file */
NULL, /* find_potential_libraries */
NULL, /* new_vers_pattern */
NULL, /* recognized file */
NULL, /* find_potential_libraries */
NULL, /* new_vers_pattern */
- NULL /* extra_map_file_text */
+ NULL, /* extra_map_file_text */
+ ${LDEMUL_EMIT_CTF_EARLY-NULL},
+ ${LDEMUL_EXAMINE_STRTAB_FOR_CTF-NULL},
+ ${LDEMUL_PRINT_SYMBOL-NULL}
};
EOF
};
EOF
This page took
0.024952 seconds
and
4
git commands to generate.