* arm.cc (Arm_output_section::append_text_sections_to_list): Do not
skip empty text sections.
* testsuite/arm_exidx_test.s: Test handling of an empty text section.
+2011-06-24 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Arm_output_section::append_text_sections_to_list): Do not
+ skip empty text sections.
+ * testsuite/arm_exidx_test.s: Test handling of an empty text section.
+
2011-06-22 Ian Lance Taylor <iant@google.com>
PR gold/12910
{
// We only care about plain or relaxed input sections. We also
// ignore any merged sections.
- if ((p->is_input_section() || p->is_relaxed_input_section())
- && p->data_size() != 0)
+ if (p->is_input_section() || p->is_relaxed_input_section())
list->push_back(Text_section_list::value_type(p->relobj(),
p->shndx()));
}
.syntax unified
.arch armv5te
- .text
+ .section .text.answer,"ax",%progbits
.align 2
.global answer
.type answer, %function
answer:
.fnstart
+ .cantunwind
mov r0, #42
bx lr
.fnend
.size answer, .-answer
+
+# Check that we can handle an empty .text section
+ .section .text.empty,"ax",%progbits
+ .align 2
+ .global empty
+ .type empty, %function
+empty:
+ .fnstart
+ .cantunwind
+ .fnend
+ .size empty, .-empty
+