Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353776 - [lisp overlay]Broken elf-file "dream" in dev-scheme/dream-20101104 package. Patch attached
Summary: [lisp overlay]Broken elf-file "dream" in dev-scheme/dream-20101104 package. P...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Low minor (vote)
Assignee: Scheme Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-05 20:20 UTC by Anton Kochkov
Modified: 2011-05-19 05:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix section table in elf.scm file (elf_header_fix.patch,804 bytes, patch)
2011-02-05 20:21 UTC, Anton Kochkov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Kochkov 2011-02-05 20:20:14 UTC
objdump cant parse valid elf file "dream", which is available
herehttp://www.stripedgazelle.org/cgi-bin/wiki_joey/dream20101104.tar.gz

objdump: file is not valid elf file

but readelf succesfully do this:
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x8048e28
  Start of program headers:          52 (bytes into file)
  Start of section headers:          180 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         4
  Size of section headers:           40 (bytes)
  Number of section headers:         0 (0)
  Section header string table index: 0

There are no sections in this file.

There are no sections in this file.

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  INTERP         0x0001d6 0x080481d6 0x00000000 0x00013 0x00013 R   0x1000
      [Requesting program interpreter: /lib/ld-linux.so.2]
  DYNAMIC        0x0000fc 0x080480fc 0x00000000 0x00048 0x00048 RW  0x1000
  LOAD           0x000000 0x08048000 0x00000000 0x07a8b 0x07a8b R E 0x1000
  LOAD           0x007a8b 0x0804fa8b 0x00000000 0x01ef5 0x1f7e5a1 RWE 0x1000

Dynamic section at offset 0xfc contains 9 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libdl.so.2]
 0x00000004 (HASH)                       0x80480dc
 0x00000005 (STRTAB)                     0x80481ac
 0x00000006 (SYMTAB)                     0x8048144
 0x0000000a (STRSZ)                      42 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000011 (REL)                        0x8048194
 0x00000012 (RELSZ)                      24 (bytes)
 0x00000013 (RELENT)                     8 (bytes)

There are no relocations in this file.

There are no unwind sections in this file.

Histogram for bucket list length (total of 1 buckets):
 Length  Number     % of total  Coverage
      0  1          (100.0%)

No version information found in this file.

Also scanelf write something: 

TYPE    PAX   PERM ENDIAN STK/REL/PTL TEXTREL RPATH BIND FILE 
ET_EXEC PeMRxS 0755 LE --- --- RWX    -      -   LAZY dream 

P.S. This bug was created from understanding another bug with paxctl from
grsecurity from gentoo: https://bugs.gentoo.org/show_bug.cgi?id=353731 .

difference between paxctl (dont recognize "dream" ) and chpax (recignize
"dream")

Also I'm attach patch, that fix this.
Comment 1 Anton Kochkov 2011-02-05 20:21:07 UTC
Created attachment 261597 [details, diff]
Fix section table in elf.scm file
Comment 2 Marijn Schouten (RETIRED) gentoo-dev 2011-02-08 09:42:59 UTC
It's not clear to me that the bug is in the file and not in objdump.
Comment 3 Anton Kochkov 2011-02-08 11:05:59 UTC
See ELF format specification - if we dont use section headers - we dont need this section in the elf header, and offset to this section also must be zero. So this is bug of dream.
Comment 4 Anton Kochkov 2011-02-08 19:18:59 UTC
see also this bug - now objdump report about such things: http://sourceware.org/bugzilla/show_bug.cgi?id=12467
Comment 5 Anton Kochkov 2011-05-19 05:46:40 UTC
Patch already in the lisp overlay tree/ebuild