[Info-vax] /NAME
hb@end.of.inter.net
h4711b at gmail.com
Thu Feb 9 06:05:44 EST 2023
On Thursday, February 9, 2023 at 4:14:35 AM UTC+1, John Reagan wrote:
> On Wednesday, February 8, 2023 at 9:10:41 PM UTC-5, Craig A. Berry wrote:
> > I think the ability exists, but you have to put code into a shareable
> > image and alias the symbols in a linker options file.
> Correct. For example, the C RTL has both UPPER and lower case symbol
> vector entries for all routines. Older C compilers also have an undocumented
> /BOTHCASE qualifier prior to the linker alias feature. "Bothcase" doesn't really
> help with one of the names might be MixedCamelCase
FWIW, here you will end up with two (universal) symbols in the shareable image's symbol table, two entries in the symbol vector with identical values (procedure descriptor address, function descriptor address or pair of code addresses) and (image) relocations for each symbol vector entry. As known, the symbol names are only used for linking with the shareable image (and for dynamically activating an image with lib$find_image_symbol). The image activator does not look at the symbol table. But it has to apply all the image relocations, no matter how many of these entries are actually referenced by the main image - it may be only "printf". For resolving UPPER and lower case symbols at link time, it is sufficient to have two (universal) symbols pointing to one symbol vector entry. That reduces the size of the symbol vector and the number of image relocations to apply. (But once you started with the current alias mechanism you may not want to switch to a different alias mechanism and break backward compatibility.)
More information about the Info-vax
mailing list