if (isym->st_shndx != SHN_UNDEF
&& isym->st_shndx < SHN_LORESERVE
&& isec->output_section == NULL
- && flinfo->info->non_contiguous_regions
- && flinfo->info->non_contiguous_regions_warnings)
+ && flinfo->info->non_contiguous_regions)
{
- _bfd_error_handler (_("warning: --enable-non-contiguous-regions "
- "discards section `%s' from '%s'\n"),
- isec->name, bfd_get_filename (isec->owner));
+ if (flinfo->info->non_contiguous_regions_warnings)
+ _bfd_error_handler (_("warning: --enable-non-contiguous-regions "
+ "discards section `%s' from '%s'\n"),
+ isec->name, bfd_get_filename (isec->owner));
continue;
}
run_dump_test "non-contiguous-arm4"
run_dump_test "non-contiguous-arm5"
run_dump_test "non-contiguous-arm6"
+run_dump_test "non-contiguous-arm7"
if { !$is_nacl && [check_shared_lib_support] } {
run_dump_test "thumb-plt"
--- /dev/null
+#name: non-contiguous-arm7
+#source: non-contiguous-arm7.s
+#ld: --enable-non-contiguous-regions -T non-contiguous-arm7.ld
+#error: \A.*unresolvable R_ARM_ABS32 relocation against symbol .MY_BUF..*\Z
--- /dev/null
+/*
+ The section .bss.MY_BUF won't fit in RAM1 or RAM2
+*/
+
+MEMORY
+{
+ ROM (rx) : ORIGIN = 0x8000000, LENGTH = 10K
+ RAM1 (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
+ RAM2 (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
+}
+
+SECTIONS
+{
+ .text :
+ {
+ KEEP(*(.text.foo)) ;
+ } >ROM
+
+ .bss :
+ {
+ _sbss = .;
+ *(.bss) *(.bss*) ;
+ _ebss = .;
+ } >RAM1
+
+ .bss_ram2 :
+ {
+ _sbss_ram2 = .;
+ *(.bss) *(.bss*) ;
+ _ebss_ram2 = .;
+ } >RAM2
+}
--- /dev/null
+ .global MY_BUF
+ .section .bss.MY_BUF,"aw",%nobits
+ .type MY_BUF, %object
+ .size MY_BUF, 102400
+MY_BUF:
+ .space 102400
+
+ .section .text.foo,"ax",%progbits
+ .global foo
+ .type foo, %function
+foo:
+ ldr r0, .L3
+ bx lr
+.L3:
+ .word MY_BUF
+ .size foo, .-foo