+2008-04-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * ldlang.c (lang_size_sections_1): Don't check LMA overflow on
+ non-load sections.
+
2008-04-25 Michael Frysinger <vapier@gentoo.org>
* configure.tgt (bfin-*-linux-uclibc*): Set targ_emul to elf32bfinfd
os_region_check (os, os->region, os->addr_tree,
os->bfd_section->vma);
- if (os->lma_region != NULL && os->lma_region != os->region)
+ if (os->lma_region != NULL && os->lma_region != os->region
+ && (os->bfd_section->flags & SEC_LOAD))
{
os->lma_region->current
= os->bfd_section->lma + TO_ADDR (os->bfd_section->size);
+2008-04-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * ld-scripts/rgn-over.exp: Allow -ok file names to pass.
+ * ld-scripts/rgn-over8.s: New.
+ * ld-scripts/rgn-over8.t: New.
+ * ld-scripts/rgn-over8-ok.d: New.
+
2008-04-21 Nathan Sidwell <nathan@codesourcery.com>
* ld-vxworks/plt-mips1.s: New.
verbose $test_name
run_dump_test $test_name
- set testname "[file tail $test_name] (map check)"
- if [file exists $map_file] {
- # compare the map file to the expectations in the .d file
- # (run_dump_test can't do that).
- if [regexp_diff $map_file $test_file] {
- fail $testname
+ if { ! [regexp ".*-ok.d" $test_file] } {
+ set testname "[file tail $test_name] (map check)"
+ if [file exists $map_file] {
+ # compare the map file to the expectations in the .d file
+ # (run_dump_test can't do that).
+ if [regexp_diff $map_file $test_file] {
+ fail $testname
+ } else {
+ pass $testname
+ }
} else {
- pass $testname
+ untested $testname
}
- } else {
- untested $testname
}
}
set LDFLAGS $old_ldflags
--- /dev/null
+# name: rgn-over8
+# source: rgn-over8.s
+# ld: -T rgn-over8.t
+# objdump: -w -h
+
+.*: file format .*
+
+Sections:
+Idx +Name +Size +VMA +LMA +File off +Algn +Flags
+ 0 .text 0+0000400 0+0000000 0+0000000 [0-9a-f]+ 2\*\*0 CONTENTS, ALLOC, LOAD, READONLY, CODE
+ 1 .data 0+0000400 0+0001000 0+0000400 [0-9a-f]+ 2\*\*0 CONTENTS, ALLOC, LOAD, DATA
+ 2 .bss 0+0000400 0+0001400 0+0000800 [0-9a-f]+ 2\*\*0 ALLOC
--- /dev/null
+ .text
+ .globl main
+ .zero 1024
+ .data
+ .zero 1024
+ .bss
+ .zero 1024
--- /dev/null
+/* Memory region overflow tests: bss to LMA doesn't cause overflow. */
+
+MEMORY {
+ rom (rwx) : ORIGIN = 0, LENGTH = 2048
+ ram (rwx) : ORIGIN = 0x1000, LENGTH = 2048
+}
+_start = 0x0;
+SECTIONS {
+ .text : { *(.text) } >rom AT>rom
+ .data : { *(.data) } >ram AT>rom
+ .bss : { *(.bss) } >ram AT>rom
+ /DISCARD/ : { *(*) }
+}