[PATCH] Fix ld -z now
Jakub Jelinek
jakub@redhat.com
Sat Feb 21 20:17:00 GMT 2004
Hi!
ld -z now without --enable-new-dtags only creates DT_FLAGS_1 with DF_1_NOW
(Sun extension) which is not recognized by all dynamic linkers.
If -z now --enable-new-dtags, it also creates DT_FLAGS with DF_BIND_NOW set.
This patch changes the case where --enable-new-dtags is not specified to
create DT_BIND_NOW dynamic tag instead.
Ok to commit?
2004-02-21 Jakub Jelinek <jakub@redhat.com>
* elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
--- bfd/elflink.h.jj 2004-02-18 20:06:00.000000000 +0100
+++ bfd/elflink.h 2004-02-21 21:08:36.904730248 +0100
@@ -2434,6 +2434,11 @@ NAME(bfd_elf,size_dynamic_sections) (bfd
if (! elf_add_dynamic_entry (info, DT_FLAGS, info->flags))
return FALSE;
}
+ else if (info->flags & DF_BIND_NOW)
+ {
+ if (! elf_add_dynamic_entry (info, DT_BIND_NOW, 0))
+ return FALSE;
+ }
if (info->flags_1)
{
Jakub
More information about the Binutils
mailing list