2011-12-08 5 views
0

내가 컴파일하고 내 프로그램을 연결하고 난 다음과 같이 구축이다 ELF32 리틀 엔디안의 형식 거지 :objcopy 매개 변수 --strip-all이 제거하는 ELF 형식의 부분은 무엇입니까?

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:       ARM 
    Version:       0x1 
    Entry point address:    0x11029000 
    Start of program headers:   52 (bytes into file) 
    Start of section headers:   6804 (bytes into file) 
    Flags:        0x5000002, has entry point, Version5 EABI 
    Size of this header:    52 (bytes) 
    Size of program headers:   32 (bytes) 
    Number of program headers:   1 
    Size of section headers:   40 (bytes) 
    Number of section headers:   16 
    Section header string table index: 13 

Section Headers: 
    [Nr] Name    Type   Addr  Off Size ES Flg Lk Inf Al 
    [ 0]     NULL   00000000 000000 000000 00  0 0 0 
    [ 1] .text    PROGBITS  11029000 001000 000414 00 AX 0 0 4 
    [ 2] .ARM.attributes ARM_ATTRIBUTES 00000000 001414 000030 00  0 0 1 
    [ 3] .comment   PROGBITS  00000000 001444 00002a 01 MS 0 0 1 
    [ 4] .debug_abbrev  PROGBITS  00000000 00146e 0000d8 00  0 0 1 
    [ 5] .debug_info  PROGBITS  00000000 001546 00013c 00  0 0 1 
    [ 6] .debug_line  PROGBITS  00000000 001682 00012f 00  0 0 1 
    [ 7] .debug_loc  PROGBITS  00000000 0017b1 00005f 00  0 0 1 
    [ 8] .debug_pubnames PROGBITS  00000000 001810 000034 00  0 0 1 
    [ 9] .debug_aranges PROGBITS  00000000 001844 000020 00  0 0 1 
    [10] .debug_ranges  PROGBITS  00000000 001864 000078 00  0 0 1 
    [11] .debug_str  PROGBITS  00000000 0018dc 0000bf 01 MS 0 0 1 
    [12] .debug_frame  PROGBITS  00000000 00199c 000048 00  0 0 4 
    [13] .shstrtab   STRTAB   00000000 0019e4 0000b0 00  0 0 1 
    [14] .symtab   SYMTAB   00000000 001d14 000450 10  15 55 4 
    [15] .strtab   STRTAB   00000000 002164 000244 00  0 0 1 
Key to Flags: 
    W (write), A (alloc), X (execute), M (merge), S (strings) 
    I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown) 
    O (extra OS processing required) o (OS specific), p (processor specific) 

There are no section groups in this file. 

Program Headers: 
    Type   Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align 
    LOAD   0x000000 0x11028000 0x11028000 0x01414 0x01414 R E 0x8000 

Section to Segment mapping: 
    Segment Sections... 
    00  .text 

There is no dynamic section in this file. 

There are no relocations in this file. 

There are no unwind sections in this file. 

Symbol table '.symtab' contains 69 entries: 
    Num: Value Size Type Bind Vis  Ndx Name 
    0: 00000000  0 NOTYPE LOCAL DEFAULT UND 
    1: 11029000  0 SECTION LOCAL DEFAULT 1 
    2: 00000000  0 SECTION LOCAL DEFAULT 2 
    3: 00000000  0 SECTION LOCAL DEFAULT 3 
    4: 00000000  0 SECTION LOCAL DEFAULT 4 
    5: 00000000  0 SECTION LOCAL DEFAULT 5 
    6: 00000000  0 SECTION LOCAL DEFAULT 6 
    7: 00000000  0 SECTION LOCAL DEFAULT 7 
    8: 00000000  0 SECTION LOCAL DEFAULT 8 
    9: 00000000  0 SECTION LOCAL DEFAULT 9 
    10: 00000000  0 SECTION LOCAL DEFAULT 10 
    11: 00000000  0 SECTION LOCAL DEFAULT 11 
    12: 00000000  0 SECTION LOCAL DEFAULT 12 
    13: 00000010  0 NOTYPE LOCAL DEFAULT ABS MODE_USR 
    14: 00000011  0 NOTYPE LOCAL DEFAULT ABS MODE_FIQ 
    15: 00000012  0 NOTYPE LOCAL DEFAULT ABS MODE_IRQ 
    16: 00000013  0 NOTYPE LOCAL DEFAULT ABS MODE_SVC 
    17: 000000d3  0 NOTYPE LOCAL DEFAULT ABS MODE_SVC_NI 
    18: 00000017  0 NOTYPE LOCAL DEFAULT ABS MODE_ABORT 
    19: 0000001b  0 NOTYPE LOCAL DEFAULT ABS MODE_UNDEF 
    20: 0000001f  0 NOTYPE LOCAL DEFAULT ABS MODE_SYSTEM 
    21: 0000001f  0 NOTYPE LOCAL DEFAULT ABS MODE_BITS 
    22: 00000080  0 NOTYPE LOCAL DEFAULT ABS I_MASK 
    23: 00000040  0 NOTYPE LOCAL DEFAULT ABS F_MASK 
    24: 000000c0  0 NOTYPE LOCAL DEFAULT ABS IF_MASK 
    25: 1201c000  0 NOTYPE LOCAL DEFAULT ABS BROM_MMU_BASE_ADDR 
    26: ffffeffa  0 NOTYPE LOCAL DEFAULT ABS MMU_DISABLE_MASK 
    27: 00001005  0 NOTYPE LOCAL DEFAULT ABS MMU_ENABLE_MASK 
    28: 00000080  0 NOTYPE LOCAL DEFAULT ABS FIQ_STACK_SIZE 
    29: 00000100  0 NOTYPE LOCAL DEFAULT ABS IRQ_STACK_SIZE 
    30: 00000020  0 NOTYPE LOCAL DEFAULT ABS ABORT_STACK_SIZE 
    31: 00000020  0 NOTYPE LOCAL DEFAULT ABS UNDEF_STACK_SIZE 
    32: 00000040  0 NOTYPE LOCAL DEFAULT ABS SYSTEM_STACK_SIZE 
    33: 11029000  0 NOTYPE LOCAL DEFAULT 1 $a 
    34: 11029080  0 NOTYPE LOCAL DEFAULT 1 arm926ejs_reset_handler 
    35: 11029004  0 NOTYPE LOCAL DEFAULT 1 $d 
    36: 1102901c  0 NOTYPE LOCAL DEFAULT 1 image_type 
    37: 11029020  0 NOTYPE LOCAL DEFAULT 1 sizeOfPermanentCode 
    38: 1102902c  0 NOTYPE LOCAL DEFAULT 1 bootparameter 
    39: 11029080  0 NOTYPE LOCAL DEFAULT 1 $a 
    40: 110290e8  0 NOTYPE LOCAL DEFAULT 1 inVirtMem 
    41: 1102915c  0 NOTYPE LOCAL DEFAULT 1 clearzi 
    42: 11029170  0 NOTYPE LOCAL DEFAULT 1 clearzi_exit 
    43: 11029170  0 NOTYPE LOCAL DEFAULT 1 load_entry 
    44: 1102918c  0 NOTYPE LOCAL DEFAULT 1 inval 
    45: 11029180  0 NOTYPE LOCAL DEFAULT 1 flushonly 
    46: 11029198  0 NOTYPE LOCAL DEFAULT 1 $d 
    47: 00000000  0 FILE LOCAL DEFAULT ABS cgu_fractional_divider.c 
    48: 110291b4  0 NOTYPE LOCAL DEFAULT 1 $a 
    49: 11029300  0 NOTYPE LOCAL DEFAULT 1 $d 
    50: 1102930c  0 NOTYPE LOCAL DEFAULT 1 $a 
    51: 110293d4  0 NOTYPE LOCAL DEFAULT 1 $d 
    52: 110293d8  0 NOTYPE LOCAL DEFAULT 1 $a 
    53: 11029410  0 NOTYPE LOCAL DEFAULT 1 $d 
    54: 00000010  0 NOTYPE LOCAL DEFAULT 12 $d 
    55: 11029414  0 NOTYPE GLOBAL DEFAULT 1 __gnu_bssend 
    56: 11029414  0 NOTYPE GLOBAL DEFAULT 1 __gnu_bssstart 
    57: 11029414  0 NOTYPE GLOBAL DEFAULT ABS __exidx_end 
    58: 00000600  0 NOTYPE GLOBAL DEFAULT ABS __image_size 
    59: 11029000  0 NOTYPE GLOBAL DEFAULT 1 __exidx_start 
    60: 11029000  0 NOTYPE GLOBAL DEFAULT 1 arm926ejs_reset 
    61: 11029000  0 NOTYPE GLOBAL DEFAULT 1 __start 
    62: 11029000  0 NOTYPE GLOBAL DEFAULT 1 __gnu_textstart 
    63: 1102930c 204 FUNC GLOBAL DEFAULT 1 adc_cgu 
    64: 11029178  0 NOTYPE GLOBAL DEFAULT 1 dcache_flush 
    65: 110291b4 344 FUNC GLOBAL DEFAULT 1 c_entry 
    66: 110293d8 60 FUNC GLOBAL DEFAULT 1 delay 
    67: 00000000  0 NOTYPE GLOBAL DEFAULT UND ea3131_init 
    68: 00000000  0 NOTYPE GLOBAL DEFAULT ABS __EH_FRAME_BEGIN__ 

No version information found in this file. 
Attribute Section: aeabi 
File Attributes 
    Tag_CPU_name: "ARM926EJ-S" 
    Tag_CPU_arch: v5TEJ 
    Tag_ARM_ISA_use: Yes 
    Tag_THUMB_ISA_use: Thumb-1 
    Tag_ABI_PCS_wchar_t: 4 
    Tag_ABI_FP_denormal: Needed 
    Tag_ABI_FP_exceptions: Needed 
    Tag_ABI_FP_number_model: IEEE 754 
    Tag_ABI_align_needed: 8-byte 
    Tag_ABI_enum_size: small 
    Tag_DIV_use: Not allowed 

그런 다음 내가 진으로 내 형식을 변경하려면 아래 명령을 사용해야합니다. 그것이 제가들은 바입니다. 하지만 누구나 ELF32 형식의 어떤 부분을 정확하게 "--strip-all"매개 변수를 제거하고 ELF32 형식과 다른 이진 형식을 어떻게 사용하는지 알 수 있습니까?

arm-none-eabi-objcopy -I elf32-littlearm -O binary --strip-all --verbose foo1 foo2 

위의 ELF32 형식 세부 정보를 포함하여 (가능한 경우) 색을 제거 할 수 있습니다.

대단히 감사합니다.

답변

0

진 순수 데이터이며, 요정이 데이터를 사용하는 방법에 대해 설명 일부 genral 형식의 데이터입니다. 요정 바이너리는 데이터 자체/

하는 마법, 섹션, 일부 테이블 등을 가지고