summaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2011-03-10 13:02:32 +0100
committerMark Wielaard <[email protected]>2011-03-11 12:59:29 +0100
commita062b6bcadd1565d360acf640f9d4c159b2270ea (patch)
tree67de26efa165a12f511b1278e112eb8460c0aff6 /backends
parenta70791179e61789e5108b3c68bae1d976da7be17 (diff)
Add new ebl_check_st_other_bits function.upstream/mpolacek/autotest
Diffstat (limited to 'backends')
-rw-r--r--backends/ChangeLog5
-rw-r--r--backends/alpha_init.c1
-rw-r--r--backends/alpha_symbol.c10
3 files changed, 16 insertions, 0 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog
index 2dcc9ef4..744d1d55 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-09 Mark Wielaard <[email protected]>
+
+ * alpha_init.c (alpha_init): Initialize check_st_other_bits hook.
+ * alpha_symbol.c (alpha_check_st_other_bits): New function.
+
2011-03-09 Roland McGrath <[email protected]>
* alpha_symbol.c (alpha_check_special_symbol): New function.
diff --git a/backends/alpha_init.c b/backends/alpha_init.c
index 14c085cc..30fe5c6c 100644
--- a/backends/alpha_init.c
+++ b/backends/alpha_init.c
@@ -57,6 +57,7 @@ alpha_init (elf, machine, eh, ehlen)
HOOK (eh, machine_section_flag_check);
HOOK (eh, check_special_section);
HOOK (eh, check_special_symbol);
+ HOOK (eh, check_st_other_bits);
HOOK (eh, register_info);
HOOK (eh, core_note);
HOOK (eh, auxv_info);
diff --git a/backends/alpha_symbol.c b/backends/alpha_symbol.c
index 4bd8793a..5d25d3e4 100644
--- a/backends/alpha_symbol.c
+++ b/backends/alpha_symbol.c
@@ -141,3 +141,13 @@ alpha_check_special_symbol (Elf *elf __attribute__ ((unused)),
return false;
}
+
+/* Check whether only valid bits are set on the st_other symbol flag.
+ Standard ST_VISIBILITY have already been masked off. */
+bool
+alpha_check_st_other_bits (unsigned char st_other)
+{
+ return ((((st_other & STO_ALPHA_STD_GPLOAD) == STO_ALPHA_NOPV)
+ || ((st_other & STO_ALPHA_STD_GPLOAD) == STO_ALPHA_STD_GPLOAD))
+ && (st_other &~ STO_ALPHA_STD_GPLOAD) == 0);
+}