-/* The Solaris 2 ABI requires two local symbols to be emitted for every
- executable and shared object.
-
- Cf. Linker and Libraries Guide, Ch. 2, Link-Editor, Generating the Output
- File, p.63. */
-static void
-elf_solaris2_after_allocation (void)
-{
- /* Local symbols required by the Solaris 2 ABI. Already emitted by
- emulparams/solaris2.sh. */
- static const char *local_syms[] = {
- "_START_",
- "_END_",
- NULL
- };
- const char **sym;
-
- /* Do this for both executables and shared objects. */
- if (!link_info.relocatable)
- {
- for (sym = local_syms; *sym != NULL; sym++)
- {
- struct elf_link_hash_entry *h;
-
- /* Lookup symbol. */
- h = elf_link_hash_lookup (elf_hash_table (&link_info), *sym,
- FALSE, FALSE, FALSE);
- if (h == NULL)
- continue;
-
- /* Turn it local. */
- h->forced_local = 1;
- /* Type should be STT_OBJECT, not STT_NOTYPE. */
- h->type = STT_OBJECT;
- }
- }
-
- gld${EMULATION_NAME}_after_allocation ();
-}
-