RFC and PATCH - Defining variables in the linker script without defining them as symbols on the file

Guilherme Destefani gd@helixbrasil.com.br
Thu Jul 8 13:26:00 GMT 2004


Hello.

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
lang_memory_region_list?

This patch was tested with binutils-2.15.90.0.3, directly on it or after
the other patchs from Fedora Core 2 binutils-2.15.90.0.3-5.src.rpm
Use patch -p0.

Thanks in advance,
-- 
Guilherme Destefani
Computer Engineer
Helix S.A.
gd _at_ helixbrasil _dot_ com _dot_ br
Brazil - Parana - Curitiba
(+5541) 362-1313
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-2.15.90.0.3-temporary.patch
Type: text/x-patch
Size: 7445 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20040708/2c3856cb/attachment.bin>


More information about the Binutils mailing list