mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
bfd/
2008-01-07 H.J. Lu <hongjiu.lu@intel.com> PR ld/5522 * elflink.c (elf_link_input_bfd): Don't write out a section if its output section is marked with SEC_NEVER_LOAD. ld/testsuite/ 2008-01-07 H.J. Lu <hongjiu.lu@intel.com> PR ld/5522 * ld-elf/noload-3.d: New file. * ld-elf/noload-3.s: Likewise. * ld-elf/noload-3.t: Likewise.
This commit is contained in:
parent
a7c02bc8e1
commit
ace7938838
@ -1,3 +1,9 @@
|
||||
2008-01-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/5522
|
||||
* elflink.c (elf_link_input_bfd): Don't write out a section if
|
||||
its output section is marked with SEC_NEVER_LOAD.
|
||||
|
||||
For older changes see ChangeLog-2007
|
||||
|
||||
Local Variables:
|
||||
|
@ -9511,6 +9511,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
|
||||
default:
|
||||
{
|
||||
if (! (o->flags & SEC_EXCLUDE)
|
||||
&& ! (o->output_section->flags & SEC_NEVER_LOAD)
|
||||
&& ! bfd_set_section_contents (output_bfd, o->output_section,
|
||||
contents,
|
||||
(file_ptr) o->output_offset,
|
||||
|
File diff suppressed because it is too large
Load Diff
1206
ld/testsuite/ChangeLog-2007
Normal file
1206
ld/testsuite/ChangeLog-2007
Normal file
File diff suppressed because it is too large
Load Diff
7
ld/testsuite/ld-elf/noload-3.d
Normal file
7
ld/testsuite/ld-elf/noload-3.d
Normal file
@ -0,0 +1,7 @@
|
||||
#ld: -T noload-3.t
|
||||
#objdump: -s -j .foo1
|
||||
|
||||
#...
|
||||
Contents of section .foo1:
|
||||
[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ [0-9a-f]+ [0-9a-f]+[ \t]+This is a test.*
|
||||
#pass
|
6
ld/testsuite/ld-elf/noload-3.s
Normal file
6
ld/testsuite/ld-elf/noload-3.s
Normal file
@ -0,0 +1,6 @@
|
||||
.section .foo2,"aw",%progbits
|
||||
.byte 1
|
||||
.section .foo1,"w",%progbits
|
||||
.string "This is a test."
|
||||
.section .foo,"aw",%progbits
|
||||
.space 16
|
7
ld/testsuite/ld-elf/noload-3.t
Normal file
7
ld/testsuite/ld-elf/noload-3.t
Normal file
@ -0,0 +1,7 @@
|
||||
SECTIONS
|
||||
{
|
||||
.foo2 : { *(.foo2) }
|
||||
.foo1 : { *(.foo1) }
|
||||
.foo (NOLOAD) : { *(.foo) }
|
||||
/DISCARD/ : { *(*) }
|
||||
}
|
Loading…
Reference in New Issue
Block a user