diff options
author | Igor Kudrin <ikudrin@accesssoftek.com> | 2016-12-21 21:23:34 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-12-22 00:12:36 +1030 |
commit | 9ef7906f20e81faa4498761002e6376f4d35c865 (patch) | |
tree | 4a14426174f1ccc9870b950e58e6f609bde04488 | |
parent | 3145b997151d2815065b5c880c1b0d63905d7630 (diff) | |
download | gdb-9ef7906f20e81faa4498761002e6376f4d35c865.zip gdb-9ef7906f20e81faa4498761002e6376f4d35c865.tar.gz gdb-9ef7906f20e81faa4498761002e6376f4d35c865.tar.bz2 |
Do not add padding if an output section is marked as ignored
* ldlang.c (size_input_section): Avoid calling insert_pad
if output_section_statement->ignored is set.
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/ldlang.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index f8c66e4..1ae4435 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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. diff --git a/ld/ldlang.c b/ld/ldlang.c index de24380..0a224d4 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -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 { |