From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rudy Folden" To: help-gcc@gnu.org Subject: Linker Sections and OBJDUMP Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <91ad4.611$CJ1.22204@dfiatx1-snr1.gtei.net> X-SW-Source: 2000-q1/msg00076.html Message-ID: <20000401000000.HIEel3F9rCqoejQFyCdd3RAKd0gx-TeeQnhm91wFzI8@z> Hi, I am converting a proprietary operating system for the PowerPC from the Diab and Metaware tools sets to GNU and have identified a new section called ".vect" which contains instructions and vectors and which must be loaded at a specific address. This was the process used under Diab and Metaware. I use the following directive in the appropriate assembly files: .section .vect and it appeared to work since the map shows the section loaded to the correct address. However, since I am converting existing startup code from the Diab tools to the GNU tools, I wanted to insure that the object generated was correct. So, I tried disassembling the objects that contain the .vect sections using the "objdump -D" option but I do not get a disassembly...it is blank. Also, when I dump the object using "objdump -h" it shows attributes for the .text and .data sections such as LOAD, READONLY, CODE or DATA, but the new .vect section does NOT show up as CODE. This leads me to believe that the object modules may not be relocatable and externals defined therein may not be resolved correctly. The following is the output of the "objdump -h" command: VBD60\PP6ra.o: file format elf32-powerpc Sections: Idx Name Size VMA LMA File off Algn 0 .text 001c2dc8 ff800000 ff800000 00040000 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 000294b0 10000000 10000000 00010000 2**4 CONTENTS, ALLOC, LOAD, DATA 2 .vxworks 00000308 100e0000 100e0000 00202dc8 2**0 CONTENTS 3 .vect 00002250 fff00000 fff00000 00203100 2**8 CONTENTS, READONLY 4 .comment 00004de0 100294b0 100294b0 00205350 2**0 CONTENTS, READONLY 5 .stab 00004788 1002e290 1002e290 0020a130 2**2 CONTENTS, READONLY, DEBUGGING 6 .debug 00045c90 1003748c 1003748c 0020e8b8 2**2 CONTENTS, READONLY, DEBUGGING 7 .debug_srcinfo0000012c 1007d11c 1007d11c 00254548 2**0 CONTENTS, READONLY, DEBUGGING 8 .debug_aranges000001bc 1007d248 1007d248 00254674 2**0 CONTENTS, READONLY, DEBUGGING 9 .debug_pubnames000008cb 1007d404 1007d404 00254830 2**0 CONTENTS, READONLY, DEBUGGING 10 .debug_sfnames00000255 1007dccf 1007dccf 002550fb 2**0 CONTENTS, READONLY, DEBUGGING 11 .line 00002d6a 1007df24 1007df24 00255350 2**0 CONTENTS, READONLY, DEBUGGING 12 .stabstr 00004a73 10032a18 10032a18 002580ba 2**0 CONTENTS, READONLY, DEBUGGING Does anyone have insight into this situation? I would really like to disassemble the objects to insure that the code is being generated correctly. I am hoping that there might be an option on the .section directive that would cause it to be treated as an "executable" section with a unique name (as with Diab), but there is not one documented. Thanks, Rudy L. Folden