Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd please sign up again. Thanks!

Linux from scratch , chapter 5.7 No output from sanity check

Discussion in 'Getting Started' started by flighter, Aug 20, 2013.

  1. flighter

    flighter Guest

    Hi i have a problem with chapter 5.7. i said that you need to test the toolchain but i get no output from the test, in most cases that is a good thing but the pdf said that their need to be output:

    If everything is working correctly, there should be no errors, and the output of the last command will be of the form:

    [Requesting program interpreter: /tools/lib/ld-linux.so.2]

    So what is the problem?

    If somebody need more information feel free to ask.



    pls: note i don't have much experience with linux so please be gentle :) i'm still learning
  2. ryanvade

    ryanvade Guest

    Okay, so you performed:
    echo 'main(){}' > dummy.c (make a dummy.c file with a main function)
    $LFS_TGT-gcc dummy.c (run the LFS gcc on it)
    readelf -l a.out | grep ': /tools'


    Hmmm. I ran the above on a normal system with no output either. However if you
    run readelf -l a.out you will get

    Elf file type is EXEC (Executable file)
    Entry point 0x400400
    There are 9 program headers, starting at offset 64
    Program Headers:
      Type           Offset             VirtAddr           PhysAddr
                     FileSiz            MemSiz              Flags  Align
      PHDR           0x0000000000000040 0x0000000000400040 0x0000000000400040
                     0x00000000000001f8 0x00000000000001f8  R E    8
      INTERP         0x0000000000000238 0x0000000000400238 0x0000000000400238
                     0x000000000000001c 0x000000000000001c  R      1
          [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
      LOAD           0x0000000000000000 0x0000000000400000 0x0000000000400000
                     0x00000000000006ac 0x00000000000006ac  R E    200000
      LOAD           0x0000000000000e10 0x0000000000600e10 0x0000000000600e10
                     0x0000000000000228 0x0000000000000230  RW     200000
      DYNAMIC        0x0000000000000e28 0x0000000000600e28 0x0000000000600e28
                     0x00000000000001d0 0x00000000000001d0  RW     8
      NOTE           0x0000000000000254 0x0000000000400254 0x0000000000400254
                     0x0000000000000044 0x0000000000000044  R      4
      GNU_EH_FRAME   0x00000000000005a4 0x00000000004005a4 0x00000000004005a4
                     0x0000000000000034 0x0000000000000034  R      4
      GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                     0x0000000000000000 0x0000000000000000  RW     8
      GNU_RELRO      0x0000000000000e10 0x0000000000600e10 0x0000000000600e10
                     0x00000000000001f0 0x00000000000001f0  R      1
     Section to Segment mapping:
      Segment Sections...
       01     .interp 
       02     .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame 
       03     .init_array .fini_array .jcr .dynamic .got .got.plt .data .bss 
       04     .dynamic 
       05     .note.ABI-tag .note.gnu.build-id 
       06     .eh_frame_hdr 
       08     .init_array .fini_array .jcr .dynamic .got 
    Or something similar.
    Notice the [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
  3. ryanvade

    ryanvade Guest


Share This Page