C语言-如何获得链接脚本定义的变量

假设你在链接脚本中定义了一个变量:

_bss_start = 100

在C语言中需要这样找到这个值:

extern int _bss_start;
// 注意要多加一个&
int val = &_bss_start;