Miscellaneous ld tidies
Localise a struct, prevent an unneeded symbol lookup, and fix a testcase. ld/ * ld.h (struct map_symbol_def): Move to.. * ldlang.h: ..here. * ldlang.c (print_assignment): Don't set expld.assign_name to dot. ld/testsuite/ * ld-scripts/pr14962-2.d: Correct target triple.
This commit is contained in:
parent
2edab91c10
commit
7dd9c6eb05
6 changed files with 18 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2014-01-22 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* ld.h (struct map_symbol_def): Move to..
|
||||||
|
* ldlang.h: ..here.
|
||||||
|
* ldlang.c (print_assignment): Don't set expld.assign_name to dot.
|
||||||
|
|
||||||
2014-01-22 Alan Modra <amodra@gmail.com>
|
2014-01-22 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* ld.texinfo (Output Section Discarding): Mention assigning to dot
|
* ld.texinfo (Output Section Discarding): Mention assigning to dot
|
||||||
|
|
5
ld/ld.h
5
ld/ld.h
|
@ -104,11 +104,6 @@ struct wildcard_list {
|
||||||
struct wildcard_spec spec;
|
struct wildcard_spec spec;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct map_symbol_def {
|
|
||||||
struct bfd_link_hash_entry *entry;
|
|
||||||
struct map_symbol_def *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define BYTE_SIZE (1)
|
#define BYTE_SIZE (1)
|
||||||
#define SHORT_SIZE (2)
|
#define SHORT_SIZE (2)
|
||||||
#define LONG_SIZE (4)
|
#define LONG_SIZE (4)
|
||||||
|
|
|
@ -3935,7 +3935,8 @@ print_assignment (lang_assignment_statement_type *assignment,
|
||||||
const char *dst = assignment->exp->assign.dst;
|
const char *dst = assignment->exp->assign.dst;
|
||||||
|
|
||||||
is_dot = (dst[0] == '.' && dst[1] == 0);
|
is_dot = (dst[0] == '.' && dst[1] == 0);
|
||||||
expld.assign_name = dst;
|
if (!is_dot)
|
||||||
|
expld.assign_name = dst;
|
||||||
tree = assignment->exp->assign.src;
|
tree = assignment->exp->assign.src;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -313,6 +313,11 @@ typedef struct
|
||||||
asection *section;
|
asection *section;
|
||||||
} lang_input_section_type;
|
} lang_input_section_type;
|
||||||
|
|
||||||
|
struct map_symbol_def {
|
||||||
|
struct bfd_link_hash_entry *entry;
|
||||||
|
struct map_symbol_def *next;
|
||||||
|
};
|
||||||
|
|
||||||
/* For input sections, when writing a map file: head / tail of a linked
|
/* For input sections, when writing a map file: head / tail of a linked
|
||||||
list of hash table entries for symbols defined in this section. */
|
list of hash table entries for symbols defined in this section. */
|
||||||
typedef struct input_section_userdata_struct
|
typedef struct input_section_userdata_struct
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2014-01-22 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* ld-scripts/pr14962-2.d: Correct target triple.
|
||||||
|
|
||||||
2014-01-22 Alan Modra <amodra@gmail.com>
|
2014-01-22 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* ld-shared/elf-offset.ld: Align end of .bss with canonical form
|
* ld-shared/elf-offset.ld: Align end of .bss with canonical form
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ld: -T pr14962-2.t
|
#ld: -T pr14962-2.t
|
||||||
#source: pr14962a.s
|
#source: pr14962a.s
|
||||||
#nm: -n
|
#nm: -n
|
||||||
#notarget: rx-*-* frv-linux
|
#notarget: rx-*-* frv-*-*linux*
|
||||||
|
|
||||||
#...
|
#...
|
||||||
0+2000 [AT] _start
|
0+2000 [AT] _start
|
||||||
|
|
Loading…
Reference in a new issue