Hi, I'm trying to get the arm-elf-gcc cross-compiler from GNUARM.org (2008-10-19) to generate a binary for me, however I get an empty binary file out of objdump. The best conclusion I can draw is that my linker command isn't working right. The compiler generates the listings right, so I can only assume the objects are correct. Judging by the output of arm-elf-size, it looks like objdump is doing its job alright as well. Through arm-elf-size, I seem to be missing the data, text, and bss sections. These really ought be there. I've posted my linker script (taken and lightly modified from at91sam7s_example_gamma) as well as what happens when I attempt to compile the executable to http://pastebin.com/d6c63a237. To clarify two things, I intend to target the AT91SAM7SE256, however right now am just sticking to the AT91SAM7S512/AT91SAM7S-EK. Can anyone help me out? Thanks, -Jeremy
Try a rebuild without compiler-options -ffunction-sections / -fdata-sections if this produces non-empty target sections you can just continue without these options. If you what to keep the unused code removal feauture, add an ENTRY directive to the linker-script which "points" to the first instruction in the reset-code (same instruction that is called on a reset-exception.
Hi, The -ffunction-sections and -fdata-sections did the trick. It's good to know about the unused code removal points as well. Thanks, -Jeremy
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.