Fix up bogon and missing log entries from .pmachata.threads branch.
diff --git a/libelf/gelf_getshdr.c b/libelf/gelf_getshdr.c
index f5457a7..8b46dfa 100644
--- a/libelf/gelf_getshdr.c
+++ b/libelf/gelf_getshdr.c
@@ -74,13 +74,13 @@
       return NULL;
     }
 
-  RWLOCK_RDLOCK (scn->elf->lock);
+  rwlock_rdlock (scn->elf->lock);
 
   if (scn->elf->class == ELFCLASS32)
     {
       /* Copy the elements one-by-one.  */
       Elf32_Shdr *shdr
-	= scn->shdr.e32 ?: __elf32_getshdr_internal (scn, LS_RDLOCKED);
+	= scn->shdr.e32 ?: __elf32_getshdr_rdlock (scn);
 
       if (shdr == NULL)
 	{
@@ -106,7 +106,7 @@
   else
     {
       Elf64_Shdr *shdr
-	= scn->shdr.e64 ?: __elf64_getshdr_internal (scn, LS_RDLOCKED);
+	= scn->shdr.e64 ?: __elf64_getshdr_rdlock (scn);
 
       if (shdr == NULL)
 	{
@@ -119,7 +119,7 @@
     }
 
  out:
-  RWLOCK_UNLOCK (scn->elf->lock);
+  rwlock_unlock (scn->elf->lock);
 
   return result;
 }