ASH: why ash_ptr_to_globals_misc is declared as const pointer
Xabier Oneca -- xOneca
xoneca at gmail.com
Thu Jan 18 22:02:45 UTC 2018
Hello,
2018-01-18 22:48 GMT+01:00 Yunlian Jiang <yunlian at google.com>:
> My question is.
> the ash_ptr_to_globals_misc, ash_ptr_to_globals_memstack and
> ash_ptr_to_globals_var
> are defined in ash_ptr_hack.c as normal pointers. But in ash.c, they are
> declared as const
> pointers. What is the benefit of doing that?
Maybe same purpose as ptr_to_globals?
https://git.busybox.net/busybox/tree/libbb/ptr_to_globals.c#n13
There also checks for GCC_COMBINE, but it does the opposite of your patch.
Cheers,
Xabier Oneca_,,_
More information about the busybox
mailing list