Add support for -z nocopyreloc.
This commit is contained in:
parent
181ddcac37
commit
8bd621d883
|
@ -1,3 +1,7 @@
|
||||||
|
2001-10-03 Vassili Karpov <malc@pulsesoft.com>
|
||||||
|
|
||||||
|
* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
|
||||||
|
|
||||||
2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
|
2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
|
||||||
|
|
||||||
* elf64-mips.c (elf_backend_may_use_rela_p): New define.
|
* elf64-mips.c (elf_backend_may_use_rela_p): New define.
|
||||||
|
|
|
@ -1127,6 +1127,13 @@ elf_i386_adjust_dynamic_symbol (info, h)
|
||||||
if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
|
if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
/* If -z nocopyreloc was given, we won't generate them either. */
|
||||||
|
if (info->nocopyreloc)
|
||||||
|
{
|
||||||
|
h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
eh = (struct elf_i386_link_hash_entry *) h;
|
eh = (struct elf_i386_link_hash_entry *) h;
|
||||||
for (p = eh->dyn_relocs; p != NULL; p = p->next)
|
for (p = eh->dyn_relocs; p != NULL; p = p->next)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2001-10-03 Vassili Karpov <malc@pulsesoft.com>
|
||||||
|
|
||||||
|
* bfdlink.h (struct bfd_link_info): Add nocopyreloc field.
|
||||||
|
|
||||||
2001-09-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
2001-09-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
* libiberty.h (reconcat): New function.
|
* libiberty.h (reconcat): New function.
|
||||||
|
|
|
@ -294,6 +294,10 @@ struct bfd_link_info
|
||||||
and sorted so that relocs against the same symbol come together. */
|
and sorted so that relocs against the same symbol come together. */
|
||||||
boolean combreloc;
|
boolean combreloc;
|
||||||
|
|
||||||
|
/* True if executable should not contain copy relocs.
|
||||||
|
Setting this true may result in a non-sharable text segment. */
|
||||||
|
boolean nocopyreloc;
|
||||||
|
|
||||||
/* How many spare .dynamic DT_NULL entries should be added? */
|
/* How many spare .dynamic DT_NULL entries should be added? */
|
||||||
unsigned int spare_dynamic_tags;
|
unsigned int spare_dynamic_tags;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2001-10-03 Vassili Karpov <malc@pulsesoft.com>
|
||||||
|
|
||||||
|
* emultempl/elf32.em (parse_args): Handle -z nocopyreloc.
|
||||||
|
* NEWS: Mention -z nocopyreloc.
|
||||||
|
* ld.texinfo (Options): Describe nocopyreloc.
|
||||||
|
|
||||||
2001-10-03 Alan Modra <amodra@bigpond.net.au>
|
2001-10-03 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* configure: Regenerate.
|
* configure: Regenerate.
|
||||||
|
|
3
ld/NEWS
3
ld/NEWS
|
@ -1,4 +1,7 @@
|
||||||
-*- text -*-
|
-*- text -*-
|
||||||
|
* Support for -z nocopyreloc in the x86 ELF linker, which disables
|
||||||
|
production of copy relocs. Warning: using this option may result in
|
||||||
|
non-sharable applications.
|
||||||
|
|
||||||
* Support for -z combreloc in the ELF linker, which puts dynamic
|
* Support for -z combreloc in the ELF linker, which puts dynamic
|
||||||
relocations against the same symbol together, so that dynamic linker
|
relocations against the same symbol together, so that dynamic linker
|
||||||
|
|
|
@ -1517,6 +1517,8 @@ cat >>e${EMULATION_NAME}.c <<EOF
|
||||||
link_info.combreloc = true;
|
link_info.combreloc = true;
|
||||||
else if (strcmp (optarg, "nocombreloc") == 0)
|
else if (strcmp (optarg, "nocombreloc") == 0)
|
||||||
link_info.combreloc = false;
|
link_info.combreloc = false;
|
||||||
|
else if (strcmp (optarg, "nocopyreloc") == 0)
|
||||||
|
link_info.nocopyreloc = true;
|
||||||
/* What about the other Solaris -z options? FIXME. */
|
/* What about the other Solaris -z options? FIXME. */
|
||||||
break;
|
break;
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -840,8 +840,9 @@ for Solaris compatibility.
|
||||||
@item -z @var{keyword}
|
@item -z @var{keyword}
|
||||||
The recognized keywords are @code{initfirst}, @code{interpose},
|
The recognized keywords are @code{initfirst}, @code{interpose},
|
||||||
@code{loadfltr}, @code{nodefaultlib}, @code{nodelete}, @code{nodlopen},
|
@code{loadfltr}, @code{nodefaultlib}, @code{nodelete}, @code{nodlopen},
|
||||||
@code{nodump}, @code{now}, @code{origin}, @code{combreloc} and
|
@code{nodump}, @code{now}, @code{origin}, @code{combreloc}, @code{nocombreloc}
|
||||||
@code{nocombreloc}. The other keywords are
|
and @code{nocopyreloc}.
|
||||||
|
The other keywords are
|
||||||
ignored for Solaris compatibility. @code{initfirst} marks the object
|
ignored for Solaris compatibility. @code{initfirst} marks the object
|
||||||
to be initialized first at runtime before any other objects.
|
to be initialized first at runtime before any other objects.
|
||||||
@code{interpose} marks the object that its symbol table interposes
|
@code{interpose} marks the object that its symbol table interposes
|
||||||
|
@ -858,6 +859,7 @@ of this object will ignore any default library search paths.
|
||||||
@code{combreloc} combines multiple reloc sections and sorts them
|
@code{combreloc} combines multiple reloc sections and sorts them
|
||||||
to make dynamic symbol lookup caching possible.
|
to make dynamic symbol lookup caching possible.
|
||||||
@code{nocombreloc} disables multiple reloc sections combining.
|
@code{nocombreloc} disables multiple reloc sections combining.
|
||||||
|
@code{nocopyreloc} disables production of copy relocs.
|
||||||
|
|
||||||
@kindex -(
|
@kindex -(
|
||||||
@cindex groups of archives
|
@cindex groups of archives
|
||||||
|
|
Loading…
Reference in New Issue