]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Miscellaneous ld tidies
authorAlan Modra <amodra@gmail.com>
Wed, 22 Jan 2014 02:21:19 +0000 (12:51 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 22 Jan 2014 02:21:19 +0000 (12:51 +1030)
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.

ld/ChangeLog
ld/ld.h
ld/ldlang.c
ld/ldlang.h
ld/testsuite/ChangeLog
ld/testsuite/ld-scripts/pr14962-2.d

index 3d73b06c6aab6c8c31afce351e540d0fb21f7202..0645c2d07a91c09fa7714f3b1e737a28512d8466 100644 (file)
@@ -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>
 
        * ld.texinfo (Output Section Discarding): Mention assigning to dot
diff --git a/ld/ld.h b/ld/ld.h
index e3ef107886fe00203d1422c0c6346d518587254d..b0544e7f891a97c83f20dc205fc334abd55da7e0 100644 (file)
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -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)
index 9e355273fdef38037d852dc14979dfb12551f0b6..62f85bcbcf44271998031898566fc95a1ad09b01 100644 (file)
@@ -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;
     }
 
index 8c815c67c166eb2369f1444b0d689b9fc538f0a3..c64ded0445bd0478edd78e3e7249dc35895d141c 100644 (file)
@@ -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
index 5fdf831d9ef177cb395917fc971d0817b1bb92ba..a269b079ea49a1a05fb3dff0c75c8310b25db93b 100644 (file)
@@ -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>
 
        * ld-shared/elf-offset.ld: Align end of .bss with canonical form
index 5e71433a596c55336bbb495fb4c4933c6a0632e6..7dd244ecedd07855170bf5b5ad5ef51876e054ed 100644 (file)
@@ -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