https://sourceware.org/bugzilla/show_bug.cgi?id=33852
--- Comment #6 from Jens Remus <jremus at linux dot ibm.com> ---
Alan, thank you very much for debugging the issue! I will review your fix and
the other s390 relocation howtos and send a patch ASAP.
Did you identify this via the relocation and looking at the code?
--- .../objdump -Dzr affinity_perturb_1.o
+++ .../objdump -Dzr affinity_perturb_2.o
...
Disassembly of section .text:
@@ -1878,7 +1878,7 @@
0000000000000000 <.LC17>:
0: 00 00 00 00 .long 0x00000000
0: R_390_TLS_LE64 gomp_tls_data
- 4: fe fe fe fe .long 0xfefefefe
+ 4: fd fd fd fd .long 0xfdfdfdfd
I gave valdind a try and it complains about the following access to
uninitialized memory, which appears to affect .debug_section instead of .text:
Syscall param write(buf) points to uninitialised byte(s)
at 0x4C47B7F: write (write.c:26)
by 0x4BC8E35: _IO_file_write@@GLIBC_2.2 (fileops.c:1241)
by 0x4BC6BED: new_do_write (fileops.c:483)
by 0x4BC7CCF: _IO_do_write@@GLIBC_2.2 (fileops.c:460)
by 0x4BC8F91: _IO_new_file_xsputn (fileops.c:1305)
by 0x4BC8F91: _IO_file_xsputn@@GLIBC_2.2 (fileops.c:1258)
by 0x4BBA179: fwrite (iofwrite.c:44)
by 0x4108A2D: cache_bwrite (cache.c:436)
by 0x4107C15: bfd_write (bfdio.c:417)
by 0x40931D1: _bfd_generic_set_section_contents (libbfd.c:1348)
by 0x40BA50B: _bfd_elf_set_section_contents (elf.c:10087)
Address 0x4ff2a24 is 3,460 bytes inside a block of size 4,096 alloc'd
at 0x4A25506: malloc (vg_replace_malloc.c:446)
by 0x4BB850B: _IO_file_doallocate (filedoalloc.c:91)
by 0x4BCA50B: _IO_doallocbuf (genops.c:373)
by 0x4BCA50B: _IO_doallocbuf (genops.c:368)
by 0x4BC894D: _IO_file_seekoff@@GLIBC_2.2 (fileops.c:991)
by 0x4BC4E45: fseeko (fseeko.c:40)
by 0x41088FD: cache_bseek (cache.c:325)
by 0x4107975: bfd_seek (bfdio.c:571)
by 0x40B2A3D: _bfd_elf_compute_section_file_positions (elf.c:4783)
by 0x40BA521: _bfd_elf_set_section_contents (elf.c:10044)
by 0x4097B39: bfd_set_section_contents (section.c:1531)
by 0x407CC47: write_contents (write.c:1673)
by 0x40979A3: bfd_map_over_sections (section.c:1391)
1333 /* This generic function can only be used in implementations where
creating
1334 NEW sections is disallowed. It is useful in patching existing
sections
1335 in read-write files, though. See other set_section_contents
functions
1336 to see why it doesn't work for new sections. */
1337 bool
1338 _bfd_generic_set_section_contents (bfd *abfd,
1339 sec_ptr section,
1340 const void *location,
1341 file_ptr offset,
1342 bfd_size_type count)
1343 {
1344 if (count == 0)
1345 return true;
1346
1347 if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0
> 1348 || bfd_write (location, count, abfd) != count)
>
1349 return false;
(gdb) p *section
$1 = {
name = 0x4e6ca10 ".debug_info",
--
You are receiving this mail because:
You are on the CC list for the bug.