diff options
author | Alan Modra <amodra@gmail.com> | 2014-01-22 12:51:19 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-01-22 12:51:19 +1030 |
commit | 7dd9c6eb050bb23bff18b3139589f202d4c63a33 (patch) | |
tree | 38c444910178181f931c7582c436099ab1c1391b | |
parent | 2edab91c10dcae30a93ce7d9f8088b8b33ee55eb (diff) | |
download | fsf-binutils-gdb-7dd9c6eb050bb23bff18b3139589f202d4c63a33.zip fsf-binutils-gdb-7dd9c6eb050bb23bff18b3139589f202d4c63a33.tar.gz fsf-binutils-gdb-7dd9c6eb050bb23bff18b3139589f202d4c63a33.tar.bz2 |
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.
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/ld.h | 5 | ||||
-rw-r--r-- | ld/ldlang.c | 3 | ||||
-rw-r--r-- | ld/ldlang.h | 5 | ||||
-rw-r--r-- | ld/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/pr14962-2.d | 2 |
6 files changed, 18 insertions, 7 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 3d73b06..0645c2d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,11 @@ 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> + * ld.texinfo (Output Section Discarding): Mention assigning to dot as a way of keeping otherwise empty sections. * ldexp.c (is_dot, is_value, is_sym_value, is_dot_ne_0, @@ -104,11 +104,6 @@ struct wildcard_list { struct wildcard_spec spec; }; -struct map_symbol_def { - struct bfd_link_hash_entry *entry; - struct map_symbol_def *next; -}; - #define BYTE_SIZE (1) #define SHORT_SIZE (2) #define LONG_SIZE (4) diff --git a/ld/ldlang.c b/ld/ldlang.c index 9e35527..62f85bc 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -3935,7 +3935,8 @@ print_assignment (lang_assignment_statement_type *assignment, const char *dst = assignment->exp->assign.dst; is_dot = (dst[0] == '.' && dst[1] == 0); - expld.assign_name = dst; + if (!is_dot) + expld.assign_name = dst; tree = assignment->exp->assign.src; } diff --git a/ld/ldlang.h b/ld/ldlang.h index 8c815c6..c64ded0 100644 --- a/ld/ldlang.h +++ b/ld/ldlang.h @@ -313,6 +313,11 @@ typedef struct asection *section; } 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 list of hash table entries for symbols defined in this section. */ typedef struct input_section_userdata_struct diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 5fdf831..a269b07 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2014-01-22 Alan Modra <amodra@gmail.com> + * ld-scripts/pr14962-2.d: Correct target triple. + +2014-01-22 Alan Modra <amodra@gmail.com> + * ld-shared/elf-offset.ld: Align end of .bss with canonical form of ALIGN that allows an empty .bss to be removed. * ld-arm/arm-dyn.ld: Likewise. diff --git a/ld/testsuite/ld-scripts/pr14962-2.d b/ld/testsuite/ld-scripts/pr14962-2.d index 5e71433..7dd244e 100644 --- a/ld/testsuite/ld-scripts/pr14962-2.d +++ b/ld/testsuite/ld-scripts/pr14962-2.d @@ -1,7 +1,7 @@ #ld: -T pr14962-2.t #source: pr14962a.s #nm: -n -#notarget: rx-*-* frv-linux +#notarget: rx-*-* frv-*-*linux* #... 0+2000 [AT] _start |