Browse Source

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.
insight_6_8-branch
H.J. Lu 19 years ago
parent
commit
ace7938838
  1. 6
      bfd/ChangeLog
  2. 1
      bfd/elflink.c
  3. 1203
      ld/testsuite/ChangeLog
  4. 1206
      ld/testsuite/ChangeLog-2007
  5. 7
      ld/testsuite/ld-elf/noload-3.d
  6. 6
      ld/testsuite/ld-elf/noload-3.s
  7. 7
      ld/testsuite/ld-elf/noload-3.t

6
bfd/ChangeLog

@ -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:

1
bfd/elflink.c

@ -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,

1203
ld/testsuite/ChangeLog

File diff suppressed because it is too large

1206
ld/testsuite/ChangeLog-2007

File diff suppressed because it is too large

7
ld/testsuite/ld-elf/noload-3.d

@ -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

@ -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

@ -0,0 +1,7 @@
SECTIONS
{
.foo2 : { *(.foo2) }
.foo1 : { *(.foo1) }
.foo (NOLOAD) : { *(.foo) }
/DISCARD/ : { *(*) }
}
Loading…
Cancel
Save