I've been trying to figure out enough about stabs to implement a small
ammount of them in an object file, but there's one thing I'm just lost on.
From my understanding, a SOL symbol marks the start of an include file, and
all symbols after that belong to that include file. The problem is, this
isn't true according to objdump.
I wrote a quick example using two files, hello.c and hello2.c. A function
hello2 is included from hello2.c from hello.c.
hello.c:
int main() {
#include "hello2.c"Quote:}
hello2.c:
int hello2() {
From my understanding, there should be a SOL symbol for hello2.c, then a FUNQuote:}
symbol for hello2(), but what I get in a objdump --stabs is:
6 FUN 0 1 08048420 79 hello2:F1
7 SOL 0 0 08048420 89 hello2.c
The FUN symbol comes before the SOL symbol. I'm confused. Am I mixed up
and it's the value that matters not the order, or is this some sort of
exception to the rule? Gdb understands this just fine, so it's not wrong
this way. Would it hurt anything to have the FUN symbol after
the SOL symbol? Also, are there better docs on stabs than the stabs texinfo
file? It's full of 'fixme's and unknowns.