Do not add padding if an output section is marked as ignored
authorIgor Kudrin <ikudrin@accesssoftek.com>
Wed, 21 Dec 2016 10:53:34 +0000 (21:23 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 21 Dec 2016 13:42:36 +0000 (00:12 +1030)
* ldlang.c (size_input_section): Avoid calling insert_pad
if output_section_statement->ignored is set.

ld/ChangeLog
ld/ldlang.c

index f8c66e4c36a63ff95a307f2d5d6062e1b1485bba..1ae4435112737de0af87da0e62784a4a2469b49e 100644 (file)
@@ -1,3 +1,8 @@
+2016-12-21  Igor Kudrin  <ikudrin@accesssoftek.com>
+
+       * ldlang.c (size_input_section): Avoid calling insert_pad
+       if output_section_statement->ignored is set.
+
 2016-12-21  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-scripts/sysroot-prefix.exp: Fix chars with high bit set.
index de24380630e0d4cfe461c4a94d9458ef47a90631..0a224d4473491956fe285e878544db9c41fc32f7 100644 (file)
@@ -4674,7 +4674,8 @@ size_input_section
 
   if (i->sec_info_type == SEC_INFO_TYPE_JUST_SYMS)
     i->output_offset = i->vma - o->vma;
-  else if ((i->flags & SEC_EXCLUDE) != 0)
+  else if (((i->flags & SEC_EXCLUDE) != 0)
+          || output_section_statement->ignored)
     i->output_offset = dot - o->vma;
   else
     {
This page took 0.029295 seconds and 4 git commands to generate.