forked from Imagelibrary/binutils-gdb
* ldlang.c (lang_check_section_addresses): Ignore non-loadable
sections when checking for overlap. Clarify error message concerns load address. testsuite/ * ld-scripts/rgn-at4.t: New. * ld-scripts/rgn-at4.d: New.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2009-05-22 Nathan Sidwell <nathan@codesourcery.com>
|
||||||
|
|
||||||
|
* ldlang.c (lang_check_section_addresses): Ignore non-loadable
|
||||||
|
sections when checking for overlap. Clarify error message
|
||||||
|
concerns load address.
|
||||||
|
|
||||||
2009-05-22 Alan Modra <amodra@bigpond.net.au>
|
2009-05-22 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* Makefile.am: Run "make dep-am".
|
* Makefile.am: Run "make dep-am".
|
||||||
|
|||||||
@@ -4498,7 +4498,8 @@ lang_check_section_addresses (void)
|
|||||||
for (s = link_info.output_bfd->sections; s != NULL; s = s->next)
|
for (s = link_info.output_bfd->sections; s != NULL; s = s->next)
|
||||||
{
|
{
|
||||||
/* Only consider loadable sections with real contents. */
|
/* Only consider loadable sections with real contents. */
|
||||||
if (IGNORE_SECTION (s) || s->size == 0)
|
if ((s->flags & SEC_NEVER_LOAD) || !(s->flags & SEC_LOAD)
|
||||||
|
|| s->size == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
sections[count] = s;
|
sections[count] = s;
|
||||||
@@ -4529,7 +4530,7 @@ lang_check_section_addresses (void)
|
|||||||
|
|
||||||
/* Look for an overlap. */
|
/* Look for an overlap. */
|
||||||
if (s_end >= os_start && s_start <= os_end)
|
if (s_end >= os_start && s_start <= os_end)
|
||||||
einfo (_("%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"),
|
einfo (_("%X%P: section %s loaded at [%V,%V] overlaps section %s loaded at [%V,%V]\n"),
|
||||||
s->name, s_start, s_end, os->name, os_start, os_end);
|
s->name, s_start, s_end, os->name, os_start, os_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
2009-05-22 Nathan Sidwell <nathan@codesourcery.com>
|
||||||
|
|
||||||
|
* ld-scripts/rgn-at4.t: New.
|
||||||
|
* ld-scripts/rgn-at4.d: New.
|
||||||
|
|
||||||
2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
|
2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||||
|
|
||||||
* ld-pe/aligncomm-1.c (_alloca): Add dummy definition to
|
* ld-pe/aligncomm-1.c (_alloca): Add dummy definition to
|
||||||
|
|||||||
13
ld/testsuite/ld-scripts/rgn-at4.d
Normal file
13
ld/testsuite/ld-scripts/rgn-at4.d
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# name: rgn-at4
|
||||||
|
# source: rgn-at.s
|
||||||
|
# ld: -T rgn-at4.t
|
||||||
|
# objdump: -w -h
|
||||||
|
|
||||||
|
.*: file format .*
|
||||||
|
|
||||||
|
Sections:
|
||||||
|
Idx +Name +Size +VMA +LMA +File off +Algn +Flags
|
||||||
|
0 .text +0+[0-9a-f][0-9a-f] +0+0010000 +0+0020000 +.*
|
||||||
|
1 .data +0+[0-9a-f][0-9a-f] +0+00100[0-9a-f]+ +0+00200[0-9a-f]+ +.*
|
||||||
|
2 .bss +0+[0-9a-f][0-9a-f] +0+00100[0-9a-f]+ +0+00200[0-9a-f]+ +.*
|
||||||
|
3 .trail +0+[0-9a-f][0-9a-f] +0+00100[0-9a-f]+ +0+00200[0-9a-f]+ +.*
|
||||||
14
ld/testsuite/ld-scripts/rgn-at4.t
Normal file
14
ld/testsuite/ld-scripts/rgn-at4.t
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/* Memory region at test, >AT should propagate by default */
|
||||||
|
|
||||||
|
MEMORY {
|
||||||
|
ram : ORIGIN = 0x10000, LENGTH = 0x100
|
||||||
|
rom : ORIGIN = 0x20000, LENGTH = 0x200
|
||||||
|
}
|
||||||
|
_start = 0x1000;
|
||||||
|
SECTIONS {
|
||||||
|
.text : { *(.text) } >ram AT>rom
|
||||||
|
.data : { *(.data) } >ram
|
||||||
|
.bss : { *(.bss) } >ram
|
||||||
|
.trail : { LONG(5) } >ram
|
||||||
|
/DISCARD/ : { *(*) }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user