Forum Discussion
Altera_Forum
Honored Contributor
19 years agoDavid,
__bss_start isn't a pointer, nor does it hold anything. It's just a number generated by the linker that states where the bss starts. i.e. __bss_start does not occupy any memory space, it is a label. You could just as easily declare it as a short or a char. extern char __bss_start; In this case, if you printf("%d\n", __bss_start); then you will be printing the CONTENTS OF the first byte of bss, which you have fooled the compiler into thinking is a char that actually occupies a memory location. Just as if you had : char fred; fred = 42; printf("%d\n", fred); Using the '&' just makes the compiler print the ADDRESS OF (i.e. the value of the label) instead of CONTENTS OF what the label is pointing to. I hope that helps. Banx.