[LLVMdev] __used__ attributes in llvm-gcc's crtstuff.c

Dimitry Andric dimitry at andric.com
Wed Dec 15 02:19:09 PST 2010


On 2010-12-14 12:26, Woongsik Choi wrote:
> My question is that why some global static variables, such as
> __frame_dummy_init_array_entry
> and __do_global_dtors_aux_fini_array_entry, are not given __used__
> attributes.
...
> I tried to give __used__ attribute to every global static variable in
> crtstuff.c and
> it caused no problem for me so far.

Note that upstream gcc has already marked more globals in crtstuff.c as
__used__:

http://gcc.gnu.org/viewcvs?view=revision&revision=159228
http://gcc.gnu.org/viewcvs?view=revision&revision=159279



More information about the llvm-dev mailing list