projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gas: avoid spurious failures in non-ELF targets in the SPARC testsuite.
[deliverable/binutils-gdb.git]
/
ld
/
ldctor.c
diff --git
a/ld/ldctor.c
b/ld/ldctor.c
index c4fd9e8f720fe65d543ea676ad89474d7aee67fd..2075ad34f2f998d192b93132040d79bc9e4b9278 100644
(file)
--- a/
ld/ldctor.c
+++ b/
ld/ldctor.c
@@
-1,7
+1,5
@@
/* ldctor.c -- constructor support routines
/* ldctor.c -- constructor support routines
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 1991-2016 Free Software Foundation, Inc.
By Steve Chamberlain <sac@cygnus.com>
This file is part of the GNU Binutils.
By Steve Chamberlain <sac@cygnus.com>
This file is part of the GNU Binutils.
@@
-88,12
+86,12
@@
ldctor_add_set_entry (struct bfd_link_hash_entry *h,
}
/* Don't permit a set to be constructed from different object
}
/* Don't permit a set to be constructed from different object
-
file formats. The same reloc may have different results. We
-
actually could sometimes handle this, but the case is
-
unlikely to ever arise. Sometimes constructor symbols are in
-
unusual sections, such as the absolute section--this appears
-
to be the case in Linux a.out--and in such cases we just
-
assume everything is OK. */
+ file formats. The same reloc may have different results. We
+ actually could sometimes handle this, but the case is
+ unlikely to ever arise. Sometimes constructor symbols are in
+ unusual sections, such as the absolute section--this appears
+ to be the case in Linux a.out--and in such cases we just
+ assume everything is OK. */
if (p->elements != NULL
&& section->owner != NULL
&& p->elements->section->owner != NULL
if (p->elements != NULL
&& section->owner != NULL
&& p->elements->section->owner != NULL
@@
-132,7
+130,7
@@
ctor_prio (const char *name)
while (*name == '_')
++name;
while (*name == '_')
++name;
- if (!
CONST_STRNEQ (name, "GLOBAL_"))
+ if (!CONST_STRNEQ (name, "GLOBAL_"))
return -1;
name += sizeof "GLOBAL_" - 1;
return -1;
name += sizeof "GLOBAL_" - 1;
@@
-141,7
+139,7
@@
ctor_prio (const char *name)
return -1;
if (name[1] != 'I' && name[1] != 'D')
return -1;
return -1;
if (name[1] != 'I' && name[1] != 'D')
return -1;
- if (!
ISDIGIT (name[3]))
+ if (!ISDIGIT (name[3]))
return -1;
return atoi (name + 3);
return -1;
return atoi (name + 3);
@@
-153,10
+151,10
@@
ctor_prio (const char *name)
static int
ctor_cmp (const void *p1, const void *p2)
{
static int
ctor_cmp (const void *p1, const void *p2)
{
- const struct set_element *
const *pe1 =
-
(const struct set_element *
const *) p1;
- const struct set_element *
const *pe2 =
-
(const struct set_element *
const *) p2;
+ const struct set_element *
const *pe1
+
= (const struct set_element *
const *) p1;
+ const struct set_element *
const *pe2
+
= (const struct set_element *
const *) p2;
const char *n1;
const char *n2;
int prio1;
const char *n1;
const char *n2;
int prio1;
@@
-276,7
+274,7
@@
ldctor_build_sets (void)
howto = bfd_reloc_type_lookup (link_info.output_bfd, p->reloc);
if (howto == NULL)
{
howto = bfd_reloc_type_lookup (link_info.output_bfd, p->reloc);
if (howto == NULL)
{
- if (
link_info.relocatable
)
+ if (
bfd_link_relocatable (&link_info)
)
{
einfo (_("%P%X: %s does not support reloc %s for set %s\n"),
bfd_get_target (link_info.output_bfd),
{
einfo (_("%P%X: %s does not support reloc %s for set %s\n"),
bfd_get_target (link_info.output_bfd),
@@
-319,11
+317,13
@@
ldctor_build_sets (void)
break;
}
break;
}
- lang_add_assignment (exp_assop ('=', ".",
- exp_unop (ALIGN_K,
- exp_intop (reloc_size))));
- lang_add_assignment (exp_assop ('=', p->h->root.string,
- exp_nameop (NAME, ".")));
+ lang_add_assignment (exp_assign (".",
+ exp_unop (ALIGN_K,
+ exp_intop (reloc_size)),
+ FALSE));
+ lang_add_assignment (exp_assign (p->h->root.string,
+ exp_nameop (NAME, "."),
+ FALSE));
lang_add_data (size, exp_intop (p->count));
for (e = p->elements; e != NULL; e = e->next)
lang_add_data (size, exp_intop (p->count));
for (e = p->elements; e != NULL; e = e->next)
@@
-332,7
+332,7
@@
ldctor_build_sets (void)
{
int len;
{
int len;
- if (!
header_printed)
+ if (!header_printed)
{
minfo (_("\nSet Symbol\n\n"));
header_printed = TRUE;
{
minfo (_("\nSet Symbol\n\n"));
header_printed = TRUE;
@@
-359,10
+359,10
@@
ldctor_build_sets (void)
}
/* Need SEC_KEEP for --gc-sections. */
}
/* Need SEC_KEEP for --gc-sections. */
- if (!
bfd_is_abs_section (e->section))
+ if (!bfd_is_abs_section (e->section))
e->section->flags |= SEC_KEEP;
e->section->flags |= SEC_KEEP;
- if (
link_info.relocatable
)
+ if (
bfd_link_relocatable (&link_info)
)
lang_add_reloc (p->reloc, howto, e->section, e->name,
exp_intop (e->value));
else
lang_add_reloc (p->reloc, howto, e->section, e->name,
exp_intop (e->value));
else
This page took
0.034383 seconds
and
4
git commands to generate.