This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Linker and stub problems on sh2


Hi,

I'm slowly starting to get things work, but I still have some doubts and
problems.

I have build a program linking my own crt0.s, with the "start" symbol
defined as the entry point and written the line ENTRY(start) in the
linker script.

In fact the linker will also load the crtbegin.o module with another
start symbol in it and when I start gdb to debug the pc is set to the
start in crtbegin. this may not be a so big problem because in the
vector table the value is correct.
Can someone explain me (or tell me where to find some docs) why the
crtbegin is loaded and what are exactly their function?

I'm using gcc 3.0.4 with newlib 1.10.0 target sh-elf for a sh2 custom board

I also haven't found a way to make the attribute NOLOAD in the linker
section to work, even if I add it to the section, it is loaded anyway.

Last thing, I added to gdbstub a serial interrupt check, which work
quietly fine, exept that sometime, the interrupt exception will scramble
the code at the address where the exception happened I understood that
this is due to the fact that the value of the gdb2_stepped_opcode is non
zero after a cont command to the gdb.

Sorry for the poor english.

Alberico 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]