aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2025-04-23 10:50:18 +0930
committerAlan Modra <amodra@gmail.com>2025-04-23 12:33:46 +0930
commit9dd98830e85cf98aafa224e485b3823210a20350 (patch)
tree0ffbf41ec21aa427895f673132e6f5c0fa6a17b6
parent343776af14932fa6b6f8f5b731c097758a6a2049 (diff)
downloadbinutils-9dd98830e85cf98aafa224e485b3823210a20350.zip
binutils-9dd98830e85cf98aafa224e485b3823210a20350.tar.gz
binutils-9dd98830e85cf98aafa224e485b3823210a20350.tar.bz2
string merge section map output
This fixes an inconsistency in the linker map file, where string merge sections (other than the first) kept their sizes. String merge sections of like entsize all are accounted in the fisrt string merge section size. * ldlang.c (print_input_section): Print SEC_EXCLUDE section size as zero.
-rw-r--r--ld/ldlang.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 0bb9e17..97fdb91 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -5062,7 +5062,8 @@ print_input_section (asection *i, bool is_discarded)
}
print_spaces (SECTION_NAME_MAP_LENGTH - len);
- if (i->output_section != NULL
+ if ((i->flags & SEC_EXCLUDE) == 0
+ && i->output_section != NULL
&& i->output_section->owner == link_info.output_bfd)
addr = i->output_section->vma + i->output_offset;
else