gas: don't process relocs for content-less sections In line with write_contents(), make write_relocs() bail early on sections without contents. Otherwise (at least without the other pair of patches just sent) .bss style sections may get relocations emitted for them, even though such sections aren't supposed to have any relocations attached. However, this causes the gas/all/none test to fail. Thoughts/advice? gas/ 2015-12-07 Jan Beulich * write.c (write_relocs): Bail early when SEC_HAS_CONTENTS is not set. --- 2015-12-07/gas/write.c +++ 2015-12-07/gas/write.c @@ -1206,7 +1206,8 @@ write_relocs (bfd *abfd, asection *sec, /* If seginfo is NULL, we did not create this section; don't do anything with it. */ - if (seginfo == NULL) + if (seginfo == NULL + || !(bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS)) return; n = 0;