Linux from scratch , chapter 5.7 No output from sanity check

F

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.


cheers

raphael


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


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'

And

If the output is not shown as above or there was no output at
all, then something is wrong. Investigate and retrace the steps
to find out where the problem is and correct it. This issue must
be resolved before continuing on.

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


Code:
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...


   00     


   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 


   07     


   08     .init_array .fini_array .jcr .dynamic .got
Or something similar.
Notice the [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
 
Building Binutils in the next section will serve as an additional check that the toolchain has been built properly. If Binutils fails to build, it is an indication that something has gone wrong with the previous Binutils, GCC, or Glibc installations
 

Members online


Latest posts

Top