From patchwork Tue Jul 7 13:42:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 7563 Received: (qmail 67010 invoked by alias); 7 Jul 2015 13:42:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 66996 invoked by uid 89); 7 Jul 2015 13:42:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f46.google.com X-Received: by 10.66.248.2 with SMTP id yi2mr8865940pac.149.1436276559638; Tue, 07 Jul 2015 06:42:39 -0700 (PDT) Date: Tue, 7 Jul 2015 06:42:37 -0700 From: "H.J. Lu" To: GNU C Library Subject: [committed, PATCH] Add la_symbind32 to x86-64 audit tests Message-ID: <20150707134237.GA18224@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) la_symbind32 is used for x32 in x86-64 audit tests. We should define both la_symbind32 and la_symbind64 in x86-64 audit tests. Tested on x32 and x86-64. Checked into master branch. H.J. --- * sysdeps/x86_64/tst-auditmod10b.c (la_symbind32): New. * sysdeps/x86_64/tst-auditmod4b.c (la_symbind32): Likewise. * sysdeps/x86_64/tst-auditmod5b.c (la_symbind32): Likewise. * sysdeps/x86_64/tst-auditmod6b.c (la_symbind32): Likewise. * sysdeps/x86_64/tst-auditmod6c.c (la_symbind32): Likewise. * sysdeps/x86_64/tst-auditmod7b.c (la_symbind32): Likewise. --- ChangeLog | 9 +++++++++ sysdeps/x86_64/tst-auditmod10b.c | 10 ++++++++++ sysdeps/x86_64/tst-auditmod4b.c | 10 ++++++++++ sysdeps/x86_64/tst-auditmod5b.c | 10 ++++++++++ sysdeps/x86_64/tst-auditmod6b.c | 10 ++++++++++ sysdeps/x86_64/tst-auditmod6c.c | 10 ++++++++++ sysdeps/x86_64/tst-auditmod7b.c | 10 ++++++++++ 7 files changed, 69 insertions(+) diff --git a/ChangeLog b/ChangeLog index 35347e2..e00fd0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2015-07-07 H.J. Lu + * sysdeps/x86_64/tst-auditmod10b.c (la_symbind32): New. + * sysdeps/x86_64/tst-auditmod4b.c (la_symbind32): Likewise. + * sysdeps/x86_64/tst-auditmod5b.c (la_symbind32): Likewise. + * sysdeps/x86_64/tst-auditmod6b.c (la_symbind32): Likewise. + * sysdeps/x86_64/tst-auditmod6c.c (la_symbind32): Likewise. + * sysdeps/x86_64/tst-auditmod7b.c (la_symbind32): Likewise. + +2015-07-07 H.J. Lu + * sysdeps/i386/Makefile (gen-as-const-headers)[elf]: Add link-defines.sym. * sysdeps/i386/dl-trampoline.S: Include . diff --git a/sysdeps/x86_64/tst-auditmod10b.c b/sysdeps/x86_64/tst-auditmod10b.c index 9bb6127..0eb3674 100644 --- a/sysdeps/x86_64/tst-auditmod10b.c +++ b/sysdeps/x86_64/tst-auditmod10b.c @@ -102,6 +102,16 @@ la_objclose (uintptr_t *cookie) } uintptr_t +la_symbind32 (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook, + uintptr_t *defcook, unsigned int *flags, const char *symname) +{ + printf ("symbind32: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n", + symname, (long int) sym->st_value, ndx, *flags); + + return sym->st_value; +} + +uintptr_t la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook, uintptr_t *defcook, unsigned int *flags, const char *symname) { diff --git a/sysdeps/x86_64/tst-auditmod4b.c b/sysdeps/x86_64/tst-auditmod4b.c index 80aaedc..2b0d827 100644 --- a/sysdeps/x86_64/tst-auditmod4b.c +++ b/sysdeps/x86_64/tst-auditmod4b.c @@ -85,6 +85,16 @@ la_objclose (uintptr_t *cookie) } uintptr_t +la_symbind32 (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook, + uintptr_t *defcook, unsigned int *flags, const char *symname) +{ + printf ("symbind32: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n", + symname, (long int) sym->st_value, ndx, *flags); + + return sym->st_value; +} + +uintptr_t la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook, uintptr_t *defcook, unsigned int *flags, const char *symname) { diff --git a/sysdeps/x86_64/tst-auditmod5b.c b/sysdeps/x86_64/tst-auditmod5b.c index 576183d..a74d261 100644 --- a/sysdeps/x86_64/tst-auditmod5b.c +++ b/sysdeps/x86_64/tst-auditmod5b.c @@ -86,6 +86,16 @@ la_objclose (uintptr_t *cookie) } uintptr_t +la_symbind32 (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook, + uintptr_t *defcook, unsigned int *flags, const char *symname) +{ + printf ("symbind32: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n", + symname, (long int) sym->st_value, ndx, *flags); + + return sym->st_value; +} + +uintptr_t la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook, uintptr_t *defcook, unsigned int *flags, const char *symname) { diff --git a/sysdeps/x86_64/tst-auditmod6b.c b/sysdeps/x86_64/tst-auditmod6b.c index b1c155a..886fc33 100644 --- a/sysdeps/x86_64/tst-auditmod6b.c +++ b/sysdeps/x86_64/tst-auditmod6b.c @@ -85,6 +85,16 @@ la_objclose (uintptr_t *cookie) } uintptr_t +la_symbind32 (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook, + uintptr_t *defcook, unsigned int *flags, const char *symname) +{ + printf ("symbind32: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n", + symname, (long int) sym->st_value, ndx, *flags); + + return sym->st_value; +} + +uintptr_t la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook, uintptr_t *defcook, unsigned int *flags, const char *symname) { diff --git a/sysdeps/x86_64/tst-auditmod6c.c b/sysdeps/x86_64/tst-auditmod6c.c index 88adb21..b2ee24d 100644 --- a/sysdeps/x86_64/tst-auditmod6c.c +++ b/sysdeps/x86_64/tst-auditmod6c.c @@ -85,6 +85,16 @@ la_objclose (uintptr_t *cookie) } uintptr_t +la_symbind32 (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook, + uintptr_t *defcook, unsigned int *flags, const char *symname) +{ + printf ("symbind32: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n", + symname, (long int) sym->st_value, ndx, *flags); + + return sym->st_value; +} + +uintptr_t la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook, uintptr_t *defcook, unsigned int *flags, const char *symname) { diff --git a/sysdeps/x86_64/tst-auditmod7b.c b/sysdeps/x86_64/tst-auditmod7b.c index 68052ef..f27076d 100644 --- a/sysdeps/x86_64/tst-auditmod7b.c +++ b/sysdeps/x86_64/tst-auditmod7b.c @@ -85,6 +85,16 @@ la_objclose (uintptr_t *cookie) } uintptr_t +la_symbind32 (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook, + uintptr_t *defcook, unsigned int *flags, const char *symname) +{ + printf ("symbind32: symname=%s, st_value=%#lx, ndx=%u, flags=%u\n", + symname, (long int) sym->st_value, ndx, *flags); + + return sym->st_value; +} + +uintptr_t la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook, uintptr_t *defcook, unsigned int *flags, const char *symname) {