mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
* emultempl/elf32.em (OPTION_GROUP): New macro.
Add new option Bgroup to longopts. (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs. (gld*_list_options): Add -Bgroup and -z defs. * ld.1: Document -Bgroup and -z defs. * ld.texinfo: Likewise.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2001-03-17 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* emultempl/elf32.em (OPTION_GROUP): New macro.
|
||||||
|
Add new option Bgroup to longopts.
|
||||||
|
(gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
|
||||||
|
(gld*_list_options): Add -Bgroup and -z defs.
|
||||||
|
* ld.1: Document -Bgroup and -z defs.
|
||||||
|
* ld.texinfo: Likewise.
|
||||||
|
|
||||||
2001-03-07 Michael Meissner <meissner@redhat.com>
|
2001-03-07 Michael Meissner <meissner@redhat.com>
|
||||||
|
|
||||||
* scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
|
* scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
|
||||||
|
@ -1334,6 +1334,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
|
|||||||
|
|
||||||
#define OPTION_DISABLE_NEW_DTAGS (400)
|
#define OPTION_DISABLE_NEW_DTAGS (400)
|
||||||
#define OPTION_ENABLE_NEW_DTAGS (OPTION_DISABLE_NEW_DTAGS + 1)
|
#define OPTION_ENABLE_NEW_DTAGS (OPTION_DISABLE_NEW_DTAGS + 1)
|
||||||
|
#define OPTION_GROUP (OPTION_ENABLE_NEW_DTAGS + 1)
|
||||||
|
|
||||||
static struct option longopts[] =
|
static struct option longopts[] =
|
||||||
{
|
{
|
||||||
@ -1347,6 +1348,8 @@ cat >>e${EMULATION_NAME}.c <<EOF
|
|||||||
{"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS},
|
{"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS},
|
||||||
{"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
|
{"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
|
||||||
{"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
|
{"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
|
||||||
|
{"Bgroup", no_argument, NULL, OPTION_GROUP},
|
||||||
|
{"Bgroup", no_argument, NULL, OPTION_GROUP},
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1405,6 +1408,12 @@ cat >>e${EMULATION_NAME}.c <<EOF
|
|||||||
link_info.new_dtags = true;
|
link_info.new_dtags = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OPTION_GROUP:
|
||||||
|
link_info.flags_1 |= (bfd_vma) DF_1_GROUP;
|
||||||
|
/* Groups must be self-contained. */
|
||||||
|
link_info.no_undefined = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'z':
|
case 'z':
|
||||||
if (strcmp (optarg, "initfirst") == 0)
|
if (strcmp (optarg, "initfirst") == 0)
|
||||||
link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST;
|
link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST;
|
||||||
@ -1430,6 +1439,8 @@ cat >>e${EMULATION_NAME}.c <<EOF
|
|||||||
link_info.flags |= (bfd_vma) DF_ORIGIN;
|
link_info.flags |= (bfd_vma) DF_ORIGIN;
|
||||||
link_info.flags_1 |= (bfd_vma) DF_1_ORIGIN;
|
link_info.flags_1 |= (bfd_vma) DF_1_ORIGIN;
|
||||||
}
|
}
|
||||||
|
else if (strcmp (optarg, "defs") == 0)
|
||||||
|
link_info.no_undefined = true;
|
||||||
/* What about the other Solaris -z options? FIXME. */
|
/* What about the other Solaris -z options? FIXME. */
|
||||||
break;
|
break;
|
||||||
EOF
|
EOF
|
||||||
@ -1463,8 +1474,10 @@ EOF
|
|||||||
|
|
||||||
if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
|
if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
|
||||||
cat >>e${EMULATION_NAME}.c <<EOF
|
cat >>e${EMULATION_NAME}.c <<EOF
|
||||||
|
fprintf (file, _(" -Bgroup\t\tSelects group name lookup rules for DSO\n"));
|
||||||
fprintf (file, _(" --disable-new-dtags\tDisable new dynamic tags\n"));
|
fprintf (file, _(" --disable-new-dtags\tDisable new dynamic tags\n"));
|
||||||
fprintf (file, _(" --enable-new-dtags\tEnable new dynamic tags\n"));
|
fprintf (file, _(" --enable-new-dtags\tEnable new dynamic tags\n"));
|
||||||
|
fprintf (file, _(" -z defs\t\tDisallows undefined symbols\n"));
|
||||||
fprintf (file, _(" -z initfirst\t\tMark DSO to be initialized first at runtime\n"));
|
fprintf (file, _(" -z initfirst\t\tMark DSO to be initialized first at runtime\n"));
|
||||||
fprintf (file, _(" -z interpose\t\tMark object to interpose all DSOs but executable\n"));
|
fprintf (file, _(" -z interpose\t\tMark object to interpose all DSOs but executable\n"));
|
||||||
fprintf (file, _(" -z loadfltr\t\tMark object requiring immediate process\n"));
|
fprintf (file, _(" -z loadfltr\t\tMark object requiring immediate process\n"));
|
||||||
|
14
ld/ld.1
14
ld/ld.1
@ -29,6 +29,7 @@ ld \- the GNU linker
|
|||||||
.I input-format\c
|
.I input-format\c
|
||||||
\&\|]
|
\&\|]
|
||||||
.RB "[\|" \-Bstatic "\|]"
|
.RB "[\|" \-Bstatic "\|]"
|
||||||
|
.RB "[\|" \-Bgroup "\|]"
|
||||||
.RB "[\|" \-Bdynamic "\|]"
|
.RB "[\|" \-Bdynamic "\|]"
|
||||||
.RB "[\|" \-Bsymbolic "\|]"
|
.RB "[\|" \-Bsymbolic "\|]"
|
||||||
.RB "[\|" "\-c\ "\c
|
.RB "[\|" "\-c\ "\c
|
||||||
@ -406,6 +407,19 @@ Link against dynamic libraries. This is only meaningful on platforms
|
|||||||
for which shared libraries are supported. This option is normally the
|
for which shared libraries are supported. This option is normally the
|
||||||
default on such platforms.
|
default on such platforms.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-Bgroup
|
||||||
|
Set the \c
|
||||||
|
.B DF_1_GROUP
|
||||||
|
\c
|
||||||
|
flag in the \c
|
||||||
|
.B DT_FLAGS_1
|
||||||
|
\c
|
||||||
|
entry in the dynamic section. This causes the runtime linker to handle
|
||||||
|
lookups in this object and its dependencies to be performed only inside
|
||||||
|
the group. No undefined symbols are allowed. This option is only
|
||||||
|
meaningful on ELF platforms which support shared libraries.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-Bsymbolic
|
.B \-Bsymbolic
|
||||||
When creating a shared library, bind references to global symbols to
|
When creating a shared library, bind references to global symbols to
|
||||||
|
@ -767,6 +767,7 @@ of this object will ignore any default library search paths.
|
|||||||
@code{nodump} marks the object can not be dumped by @code{dldump}.
|
@code{nodump} marks the object can not be dumped by @code{dldump}.
|
||||||
@code{now} marks the object with the non-lazy runtime binding.
|
@code{now} marks the object with the non-lazy runtime binding.
|
||||||
@code{origin} marks the object may contain $ORIGIN.
|
@code{origin} marks the object may contain $ORIGIN.
|
||||||
|
@code{defs} disallows undefined symbols.
|
||||||
|
|
||||||
@kindex -(
|
@kindex -(
|
||||||
@cindex groups of archives
|
@cindex groups of archives
|
||||||
@ -805,6 +806,14 @@ for compatibility with various systems. You may use this option
|
|||||||
multiple times on the command line: it affects library searching for
|
multiple times on the command line: it affects library searching for
|
||||||
@code{-l} options which follow it.
|
@code{-l} options which follow it.
|
||||||
|
|
||||||
|
@kindex -Bgroup
|
||||||
|
@item -Bgroup
|
||||||
|
Set the @code{DF_1_GROUP} flag in the @code{DT_FLAGS_1} entry in the dynamic
|
||||||
|
section. This causes the runtime linker to handle lookups in this
|
||||||
|
object and its dependencies to be performed only inside the group.
|
||||||
|
@code{--no-undefined} is implied. This option is only meaningful on ELF
|
||||||
|
platforms which support shared libraries.
|
||||||
|
|
||||||
@kindex -Bstatic
|
@kindex -Bstatic
|
||||||
@kindex -dn
|
@kindex -dn
|
||||||
@kindex -non_shared
|
@kindex -non_shared
|
||||||
@ -945,9 +954,11 @@ necessary. This may be required if @code{ld} runs out of memory space
|
|||||||
while linking a large executable.
|
while linking a large executable.
|
||||||
|
|
||||||
@kindex --no-undefined
|
@kindex --no-undefined
|
||||||
|
@kindex -z defs
|
||||||
@item --no-undefined
|
@item --no-undefined
|
||||||
|
@itemx -z defs
|
||||||
Normally when creating a non-symbolic shared library, undefined symbols
|
Normally when creating a non-symbolic shared library, undefined symbols
|
||||||
are allowed and left to be resolved by the runtime loader. This option
|
are allowed and left to be resolved by the runtime loader. These options
|
||||||
disallows such undefined symbols.
|
disallows such undefined symbols.
|
||||||
|
|
||||||
@kindex --allow-shlib-undefined
|
@kindex --allow-shlib-undefined
|
||||||
@ -4899,5 +4910,3 @@ to permit their use in free software.
|
|||||||
|
|
||||||
@contents
|
@contents
|
||||||
@bye
|
@bye
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user