This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Building in big endian format

Hi,

I am trying to build the executable file in big endian format for c6424 platform using ccsv4.2.  When I check the coff format of the file generated using the ofd6x.exe utility, the test output is as given below. Even though the machine endian is in big endian format, control data is in little endian format. I would like to get the control data also in big endian format. Could you please let me know what additional settings will be required for this?

           
    Format:                    TI-COFF Version 2                         
    File Type:                 executable file                           
    Time Stamp:                Thu Mar 08 11:30:58 2012                  
    Machine:                   TI C6x                                    
    Machine Endian:            big endian                                
    Entry Point:               0x84dee160                                
    Vendor:                    Texas Instruments, Inc.                   
    Producer:                  Linker                                    
    Linker Version:            6.1.18                                    
    Number of Sections:        32                                        
    File Length:               2684249                                   
    Symbol Table File Offset:  0x001ea8db                                
    String Table File Offset:  0x0025db53                                
    TI-COFF f_flags:           0x00001263                                
    TI-COFF f_flag:            F_RELFLG (relocation info stripped)       
    TI-COFF f_flag:            F_SYMMERGE (debug type information merged)
    CPU Generation:            C6400+                                    
    Control Data Endian:       little endian                             
    Start of .text Section:    0x84d00000                                
    Start of .data Section:    0x80000000                                
    Size of .text Section:     982656                                    
    Size of .data Section:     0                                         
    Size of .bss Section:      416   

Regards,

Smitha Joseph

  • There is no method by which a user can change the endianness of the control data.

    Background for the interested ... An object file contains both machine data which is loaded directly to the target system, and control data which describes other information in the object file.  Examples of control data include the file header, section headers, and symbol table records.  The endianness of the machine data matches what is required by the target.  The endianness of the control data can be different.  In COFF files, the endianness of the control data is the same as the host system which produced the file.  For Elf files, the endianness of the control data is different.  I don't recall right now, but I think it is always little endian.  None of this changes the basic point I made at the start.  The user cannot change the endianness of the control data.

    Thanks and regards,

    -George