RFC and PATCH - Defining variables in the linker script without defining them as symbols on the file
Thu Jul 8 13:26:00 GMT 2004
This patch add to the linker a command like PROVIDE(var=value), named
TEMPORARY(var=value) that can be used to define variables just for
temporary use, so those variables won't be sent to the file as a symbol.
I made the linked list that keep those variables in memory based on the
list that keep the memory regions on memory (static
lang_memory_region_type *lang_memory_region_list; @ld/ldlang.c:517)
BUT I didn't find where that linked list is free().
I suppose that it's not free, because is a small amount of memory and
the linker will terminate and that memory will be free by the OS when
the program end anyway, but I'm not sure.
Somebody can please confirm that, or I should free that memory in the
same place (that I didn't find) that the linker free
This patch was tested with binutils-184.108.40.206.3, directly on it or after
the other patchs from Fedora Core 2 binutils-220.127.116.11.3-5.src.rpm
Use patch -p0.
Thanks in advance,
gd _at_ helixbrasil _dot_ com _dot_ br
Brazil - Parana - Curitiba
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7445 bytes
Desc: not available
More information about the Binutils