Bug 481491 - "elflint"/dwarflint: Validate .symtab addresses
Summary: "elflint"/dwarflint: Validate .symtab addresses
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: elfutils
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-25 17:03 UTC by Jan Kratochvil
Modified: 2009-01-25 20:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-25 19:57:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Kratochvil 2009-01-25 17:03:14 UTC
Description of problem:
There was a ld.so problem for GDB due to ld.so having invalid address in its .symtab - the address was out of bounds of its section.

Some elfutils-based validation tool (dwarflint? But this is just a part of ELF.) could check such validity in the first place.

From ls.do Bug 481490:
http://porkchop.devel.redhat.com/brewroot/packages/glibc/2.3.4/2.41.el4_7.1/ppc/glibc-2.3.4-2.41.el4_7.1.ppc.rpm
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf
Al
  [21] .bss              NOBITS          00028a60 018960 000030 00  WA  0   0
4
0x00028a60 + 0x000030 == 0x28a90
  [18] .sdata            PROGBITS        00028530 018530 000430 00  WA  0   0
8
Symbol table '.symtab' contains 723 entries:
   600: 00030530     0 OBJECT  LOCAL  DEFAULT   18 _SDA_BASE_

0x30530 > 0x28a90 - being the end of file - which should not happen.
In fact it should not be out of the range of its section number 18.

Comment 1 Roland McGrath 2009-01-25 19:57:03 UTC
_SDA_BASE_ is a special-case symbol on ppc.  elflint does have checks for symbols being out of their section bounds, but there are machine-dependent special exceptions.  _SDA_BASE_ is set to .sdata+0x8000 because it's used for ppc insns where there is a -0x8000 bias applied to constants (or something like that).  Also _SDA2_BASE_ is .sdata2+0x8000.

Comment 2 Jan Kratochvil 2009-01-25 20:18:24 UTC
Understood so it is a GDB bug instead, thanks.
It is even in the elfutils source, sorry.


Note You need to log in before you can comment on or make changes to this bug.