0

In our project, we are building an ELF file and a partially linked file (PLF) which is converted to a proprietary format and loaded into memory after the ELF is loaded. We use Codewarrior to run and debug, which has been working just fine (the C++ source code is always available to step through when debugging).

I've recently made a change where some code and data are compiled into a different section in the PLF file (.init, which was previously empty). Now, when debugging, a majority of the files are available only in assembler. When I re-build, no longer using .init, we can step through C++ source code again.

Does anyone know why this would be the case?

thehelix
  • 578
  • 1
  • 6
  • 10

2 Answers2

0

why this would be the case

One reason could be that codewarrior is not expecting to find code in .init section.

You are unlikely to get a good answer here. Try codewarrior support forums.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
  • The codewarrior forums would have been a good idea. I've only just started using it so I'm new to it. But I solved the problem after experimenting a few more hours. :) – thehelix Jun 27 '13 at 23:50
0

I got this working by switching the order of the sections using the linker command file (.lcf) so that the .init section comes second after .text. I guess as Employed Russian suggests, CodeWarrior is surprised by having code in .init and craps out. Changing the order of the sections seems to have no ill effects and now debugging works as expected again.

thehelix
  • 578
  • 1
  • 6
  • 10