[Bug binutils/10363] New: objdump -T crashes on corrupted file

2009-07-05 Thread doko at debian dot org
[forwarded from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487963]

seen with 2.18, 2.19, and trunk 20090704 on x86-64-linux-gnu:

On amd64, the attached file causes objdump -T to crash.

   It's probably possible to create a similar file on another
architecture. Here is how I did:

  ~% zzuf -j4 -qv -s0: -r0.01:0.01 -c objdump -T /usr/lib/libm.so
  zzuf[s=0,r=1e-06:0.01]: launched `objdump'
 [...]
  zzuf[s=785,r=1e-06:0.01]: launched `objdump'
  zzuf[s=786,r=1e-06:0.01]: launched `objdump'
  zzuf[s=787,r=1e-06:0.01]: signal 11 (SIGSEGV)
  ~% zzuf -s787 -r0.01:0.01 < /usr/lib/libm.so > /tmp/foo.so
  ~% objdump -T /tmp/foo.so
 [...]
  [1]7998 segmentation fault  objdump -T /tmp/foo.so

-- 
   Summary: objdump -T crashes on corrupted file
   Product: binutils
   Version: 2.20 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: doko at debian dot org
CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10363

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10363] objdump -T crashes on corrupted file

2009-07-05 Thread doko at debian dot org

--- Additional Comments From doko at debian dot org  2009-07-05 13:27 
---
Created an attachment (id=4036)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4036&action=view)
example file


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10363

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10364] New: strip doesn't fail on unwriteable files

2009-07-05 Thread doko at debian dot org
[forwarded from http://bugs.debian.org/276428]

$ chmod -w t.so 
$ strip t.so 
strip: unable to copy file 't.so'; reason: Permission denied
$ echo $?
0

-- 
   Summary: strip doesn't fail on unwriteable files
   Product: binutils
   Version: 2.20 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: doko at debian dot org
CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10364

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10365] New: ld: does not set DT_TEXTREL on libs with R_ARM_PC24 relocations

2009-07-05 Thread doko at debian dot org
[forwarded from http://bugs.debian.org/255191]

rechecked with 2.19 and trunk.

The gc libs in the bigloo package, built as non-PIC for performance reason
on platforms that support mixing PIC and non-PIC, contain an R_ARM_PC24
relocation:

b328  0001a001 R_ARM_PC24c134   GC_push_current_stack

However, the lib is not flagged as containing relocations in the text
segment:

  Flags: 0x2, has entry point, GNU EABI


This appears to be the cause of ld-linux.so segfaulting when it processes
this relocation:

$ LD_TRACE_LOADED_OBJECTS=1 LD_WARN=yes LD_BIND_NOW=yes
/usr/lib/debug/ld-linux.so.2 ./bin/bdb
libbigloobdl_s-2.6d.so =>
/home/ydirson/bigloo-2.6d-32-O1-g/lib/2.6d/libbigloobdl_s-2.6d.so (0x40001000)
libbigloo_s-2.6d.so =>
/home/ydirson/bigloo-2.6d-32-O1-g/lib/2.6d/libbigloo_s-2.6d.so (0x40038000)
libbigloogc-2.6d.so =>
/home/ydirson/bigloo-2.6d-32-O1-g/lib/2.6d/libbigloogc-2.6d.so (0x401b2000)
libdl.so.2 => /lib/libdl.so.2 (0x401e2000)
libm.so.6 => /lib/libm.so.6 (0x401ec000)
libc.so.6 => /lib/libc.so.6 (0x40266000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4038c000)
/lib/ld-linux.so.2 => /usr/lib/debug/ld-linux.so.2 (0x2000)
Segmentation fault (core dumped)

As a workaround, I'll force building PIC code on ARM.


Detailed analysis (from Philip Blundell):

$ gdb /usr/lib/debug/ld-linux.so.2 core
[...]
Core was generated by /usr/lib/debug/ld-linux.so.2 ./bin/bdb'.
Program terminated with signal 11, Segmentation fault.
Cannot access memory at address 0x2aab36bc


0x2aab36bc - 0x2000 = 96bc

and:

96b4:   e3c034ffbic r3, r0, #-16777216  ; 0xff00
96b8:   e1824003orr r4, r2, r3
96bc:   e58c4000str r4, [ip]
96c0:   eae6b   9660 <_dl_relocate_object+0xcac>

Phil has identified this to be the code that relocates R_ARM_PC24 relocs.

Here's a small testcase.

$ echo "f() { return g(); }" > t.c
$ gcc -shared -o t.so t.c
$ readelf -d t.so | grep TEXTREL

If the linker is behaving correctly, the last command should output a
line like:

 0x0016 (TEXTREL)0x0

p.

-- 
   Summary: ld: does not set DT_TEXTREL on libs with R_ARM_PC24
relocations
   Product: binutils
   Version: 2.20 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: doko at debian dot org
CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10365

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10367] New: ar --help and ar texinfo documentation out of sync

2009-07-05 Thread doko at debian dot org
[forwarded from http://bugs.debian.org/467081]

the complaint in the bug report is that [member-name] comes before the archive 
file.

 _("Usage: %s [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name]
[count] archive-file file...\n"); 

smallexample 
ar [...@option{--plugin} @var{name}] [...@var{p}[@var{mod} [...@var{relpos}]
[...@var{count}]] @var{archive} [...@var{member}@dots{}] 
ar -M [ http://sourceware.org/bugzilla/show_bug.cgi?id=10367

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10368] New: ISO 8859 mentioned as 7bit encoding in strings documentation

2009-07-05 Thread doko at debian dot org
[forwarded from http://bugs.debian.org/452277]

is there a reason that it is mentioned here for `s'?

The strings manpage says describing the --encoding option:

"Possible  values for encoding are: s = single-7-bit-byte characters
(ASCII, ISO 8859, etc., default), S = single-8-bit-byte
characters,..."

However, ISO 8859 is NOT a 7 bit encoding, but rather an 8 bit encoding.

-- 
   Summary: ISO 8859 mentioned as 7bit encoding in strings
documentation
   Product: binutils
   Version: 2.20 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: doko at debian dot org
CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10368

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/10367] ar --help and ar texinfo documentation out of sync

2009-07-05 Thread schwab at linux-m68k dot org

--- Additional Comments From schwab at linux-m68k dot org  2009-07-05 15:17 
---
[member-name] and [count] are the arguments of the a, b and N modifiers, and 
correspond to the [...@var{relpos}] and [...@var{count}] parts in the texinfo 
description.

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


http://sourceware.org/bugzilla/show_bug.cgi?id=10367

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/10342] Wrong instruction-byte association on Z80 port

2009-07-05 Thread chris at zxdesign dot info

--- Additional Comments From chris at zxdesign dot info  2009-07-05 15:48 
---
Fixed in HEAD 2008-09-14
http://sourceware.org/ml/binutils/2008-09/msg00105.html

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=10342

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils