diff options
author | Nick Clifton <nickc@redhat.com> | 2010-10-06 08:58:59 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2010-10-06 08:58:59 +0000 |
commit | ea5cae92bdd0686144ac42346d32c58e6f0e0b16 (patch) | |
tree | c8b3bc69800b8c40581a0b39dd1c198e565ffb17 /ld/testsuite/ld-scripts | |
parent | c0e4ee6b249d0e2fc3f3e4e0864e00faf93fe126 (diff) | |
download | gdb-ea5cae92bdd0686144ac42346d32c58e6f0e0b16.zip gdb-ea5cae92bdd0686144ac42346d32c58e6f0e0b16.tar.gz gdb-ea5cae92bdd0686144ac42346d32c58e6f0e0b16.tar.bz2 |
* script-sections.cc(class Memory_region): Remove
current_lma_offset_ field. Rename current_vma_offset_ to
current_offset_. Add last_section_ field.
(Memory_region::get_current_vma_address): Rename to
get_current_address.
(Memory_region::get_current_lma_address): Delete.
(Memory_region::increment_vma_offset): Rename to
increment_offset.
(Memory_region::increment_lma_offset): Delete.
(Memory_region::attributes_compatible): New method. Returns
true if the provided section is compatible with the region.
(Memory_region::get_last_section): New method. Returns the last
section to use the region.
(Memory_region::set_last_section): New method. Stores the last
section to use the region.
(Script_sections::block_in_region): New method. Returns true if
a block of memory is contained within a region.
(Script_sections::find_memory_region): New method. Locates a
memory region to be used to set a VMA or LMA address.
(Output_section_definition::set_section_addresses): Add code to
check for addresses set by memory regions.
(Output_segment::set_section_addresses): Remove memory region
walking code.
(Script_sections::create_segment): Add a warning if a header
segment is created outside of any region.
* script-sections.h (class Script_sections): Add prototypes for
find_memory_region and block_in_region methods.
* testsuite/memory_test.s: Use .long instead of .word.
* testsuite/memory_test.t: Add some more output sections.
* testsuite/memory_test.sh: Update expected output.
* ld.texinfo: Update description of computation of VMA and LMA
addresses for output sections.
* ld-scripts/rgn-at5.t: Add some more output sections.
* ld-scripts/rgn-at5.d: Update expected output.
Diffstat (limited to 'ld/testsuite/ld-scripts')
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-at5.d | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-at5.t | 10 |
2 files changed, 13 insertions, 8 deletions
diff --git a/ld/testsuite/ld-scripts/rgn-at5.d b/ld/testsuite/ld-scripts/rgn-at5.d index e33b34b..972c6c2 100644 --- a/ld/testsuite/ld-scripts/rgn-at5.d +++ b/ld/testsuite/ld-scripts/rgn-at5.d @@ -11,9 +11,10 @@ Sections: Idx +Name +Size +VMA +LMA +File off +Algn +Flags - 0 .sec0 +0+4 +0+02000 +0+2000 +0+02000 +.* - 1 .sec1 +0+4 +0+01000 +0+012c +0+01000 +.* - 2 .sec2 +0+4 +0+04000 +0+603c +0+04000 +.* - 3 .sec3 +0+4 +0+05000 +0+412c +0+03000 +.* - 4 .sec4 +0+4 +0+02004 +0+2004 +0+02004 +.* + 0 .sec0 +0+4 +0+2000 +0+2000 +0+1000 +.* + 1 .sec1 +0+4 +0+1000 +0+2004 +0+2000 +.* + 2 .sec2 +0+4 +0+4000 +0+603c +0+4000 +.* + 3 .sec3 +0+4 +0+5000 +0+5000 +0+3000 +.* + 4 .sec4 +0+4 +0+2008 +0+2008 +0+2008 +.* + 5 .sec5 +0+4 +0+200c +0+200c +0+200c +.* #pass diff --git a/ld/testsuite/ld-scripts/rgn-at5.t b/ld/testsuite/ld-scripts/rgn-at5.t index 53ad242..3a35994 100644 --- a/ld/testsuite/ld-scripts/rgn-at5.t +++ b/ld/testsuite/ld-scripts/rgn-at5.t @@ -10,13 +10,17 @@ SECTIONS { .sec0 : { *(*.sec0) } - .sec1 ORIGIN (region1) : AT(LENGTH (region2)) { *(*.sec1) } + .sec1 ORIGIN (region1) : { *(*.sec1) } AT> region2 - fred = ORIGIN (region1) + LENGTH (region1) ; + fred = ORIGIN (region1) + LENGTH (region1); .sec2 : { *(*.sec2) } > region3 AT> region4 .sec3 0x5000 : { *(*.sec3) } - /DISCARD/ : { *(.reginfo) } + .sec4 : { *(*.sec4) } AT> region2 + + .sec5 : { LONG(0x5555) } > region2 + + /DISCARD/ : { *(*) } } |