summaryrefslogtreecommitdiff
path: root/libelf/libelfP.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-06-10 06:33:00 +0000
committerUlrich Drepper <drepper@redhat.com>2006-06-10 06:33:00 +0000
commita688a732b671263838c2cd056ab5dbb71be91468 (patch)
treec0f222b2c1b7ae6d088d75f738350ba2e47b773b /libelf/libelfP.h
parentbdb29c0b5613ecda012edfd291765f17da3939da (diff)
downloadelfutils-a688a732b671263838c2cd056ab5dbb71be91468.tar.gz
* i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
for PLT entries if there is no local definition. * ld.c (parse_option): Handle -z ignore like --as-needed and -z record like --no-as-needed. * ld.h (struct ld_state): Remove ignore_unused_dsos field. * ldgeneric.c (new_generated_scn): Always compute ndt_needed by looping over DSOs. When deciding about adding DT_NEEDED entries use ->as_needed instead of ignore_unused_dsos.
Diffstat (limited to 'libelf/libelfP.h')
-rw-r--r--libelf/libelfP.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/libelf/libelfP.h b/libelf/libelfP.h
index 54158aeb..ed6b5f7f 100644
--- a/libelf/libelfP.h
+++ b/libelf/libelfP.h
@@ -1,5 +1,5 @@
/* Internal interfaces for libelf.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 Red Hat, Inc.
This file is part of Red Hat elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -546,8 +546,9 @@ extern uint32_t __libelf_crc32 (uint32_t crc, unsigned char *buf, size_t len)
/* We often have to update a flag iff a value changed. Make this
- convenient. */
-#define update_if_changed(var, exp, flag) \
+ convenient. None of the parameters must have a side effect. */
+#ifdef __GNUC__
+# define update_if_changed(var, exp, flag) \
do { \
__typeof__ (var) *_var = &(var); \
__typeof__ (exp) _exp = (exp); \
@@ -557,5 +558,15 @@ extern uint32_t __libelf_crc32 (uint32_t crc, unsigned char *buf, size_t len)
(flag) |= ELF_F_DIRTY; \
} \
} while (0)
+#else
+# define update_if_changed(var, exp, flag) \
+ do { \
+ if ((var) != (exp)) \
+ { \
+ (var) = (exp); \
+ (flag) |= ELF_F_DIRTY; \
+ } \
+ } while (0)
+#endif
#endif /* libelfP.h */