Annotate RELOC_DYN() on non-hppa as only used in lib/csu.
Delete some inconsistent comments, adjust whitespace, and reorder
mips64's archdep.h so that the ld.so/*/archdep.h files look
(almost) the same.
ok visa@ kettenis@
-/* $OpenBSD: archdep.h,v 1.6 2019/10/23 19:55:08 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.7 2021/11/14 22:07:38 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#define _AARCH64_ARCHDEP_H_
#define RELOC_TAG DT_RELA
-
-#define MACHID EM_AARCH64 /* ELF e_machine ID value checked */
+#define MACHID EM_AARCH64 /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
#include "util.h"
+/* Only used in lib/csu/boot.h */
static inline void
RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
}
}
-#define RELOC_GOT(obj, offs)
-
#endif /* _AARCH64_ARCHDEP_H_ */
-/* $OpenBSD: archdep.h,v 1.23 2019/10/23 19:55:08 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.24 2021/11/14 22:07:38 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#define _ALPHA_ARCHDEP_H_
#define RELOC_TAG DT_RELA
-
-#define MACHID EM_ALPHA_EXP /* ELF e_machine ID value checked */
+#define MACHID EM_ALPHA_EXP /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
#include "syscall.h"
#include "util.h"
+
+/* Only used in lib/csu/boot.h */
static inline void
RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
}
}
-#define RELOC_GOT(obj, offs)
-
#endif /* _ALPHA_ARCHDEP_H_ */
-/* $OpenBSD: archdep.h,v 1.13 2019/10/23 19:55:09 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.14 2021/11/14 22:07:38 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#define _X86_64_ARCHDEP_H_
#define RELOC_TAG DT_RELA
-
-#define MACHID EM_AMD64 /* ELF e_machine ID value checked */
+#define MACHID EM_AMD64 /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
#include "util.h"
+/* Only used in lib/csu/boot.h */
static inline void
RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
}
}
-#define RELOC_GOT(obj, offs)
-
#endif /* _X86_64_ARCHDEP_H_ */
-/* $OpenBSD: archdep.h,v 1.13 2017/10/27 16:47:08 mpi Exp $ */
+/* $OpenBSD: archdep.h,v 1.14 2021/11/14 22:07:38 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#define _ARM_ARCHDEP_H_
#define RELOC_TAG DT_REL
-
-#define MACHID EM_ARM /* ELF e_machine ID value checked */
+#define MACHID EM_ARM /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
#include "syscall.h"
#include "util.h"
-/*
- * The following functions are declared inline so they can
- * be used before bootstrap linking has been finished.
- */
+/* Only used in lib/csu/boot.h */
static inline void
RELOC_DYN(Elf_Rel *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
}
}
-#define RELOC_GOT(obj, offs)
-
#endif /* _ARM_ARCHDEP_H_ */
-/* $OpenBSD: archdep.h,v 1.16 2017/10/27 16:47:08 mpi Exp $ */
+/* $OpenBSD: archdep.h,v 1.17 2021/11/14 22:07:38 guenther Exp $ */
/*
* Copyright (c) 2004 Michael Shalayeff
#define _HPPA_ARCHDEP_H_
#define RELOC_TAG DT_RELA
-#define HAVE_JMPREL 1
-
-#define MACHID EM_PARISC /* ELF e_machine ID value checked */
+#define MACHID EM_PARISC /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
}
}
-#define RELOC_GOT(obj, offs)
-
void _hppa_dl_dtors(void);
Elf_Addr _dl_md_plabel(Elf_Addr, Elf_Addr *);
-/* $OpenBSD: boot_md.c,v 1.4 2019/11/28 16:57:17 guenther Exp $ */
+/* $OpenBSD: boot_md.c,v 1.5 2021/11/14 22:07:38 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
RELOC_DYN(rp, sp, ra, loff);
rp++;
}
-
- RELOC_GOT(&dynld, loff);
}
-/* $OpenBSD: archdep.h,v 1.21 2019/10/23 19:55:09 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.22 2021/11/14 22:07:38 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#define _I386_ARCHDEP_H_
#define RELOC_TAG DT_REL
-
-#define MACHID EM_386 /* ELF e_machine ID value checked */
+#define MACHID EM_386 /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
#include "util.h"
+/* Only used in lib/csu/boot.h */
static inline void
RELOC_DYN(Elf_Rel *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
}
}
-#define RELOC_GOT(obj, offs)
-
#endif /* _I386_ARCHDEP_H_ */
-/* $OpenBSD: archdep.h,v 1.8 2019/10/23 19:55:09 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.9 2021/11/14 22:07:38 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#define _M88K_ARCHDEP_H_
#define RELOC_TAG DT_RELA
-
-#define MACHID EM_88K /* ELF e_machine ID value checked */
+#define MACHID EM_88K /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
#include "syscall.h"
#include "util.h"
-/*
- * The following functions are declared inline so they can
- * be used before bootstrap linking has been finished.
- */
+/* Only used in lib/csu/boot.h */
static inline void
RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
}
}
-#define RELOC_GOT(obj, offs) do { } while (0)
-
#endif /* _M88K_ARCHDEP_H_ */
-/* $OpenBSD: archdep.h,v 1.15 2019/10/23 19:55:09 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.16 2021/11/14 22:07:39 guenther Exp $ */
/*
* Copyright (c) 1998-2002 Opsycon AB, Sweden.
#ifndef _MIPS_ARCHDEP_H_
#define _MIPS_ARCHDEP_H_
+#define RELOC_TAG DT_REL
+#define MACHID EM_MIPS /* ELF e_machine ID value checked */
+
#include <elf.h>
#include <machine/reloc.h>
#include "syscall.h"
#include "util.h"
-#define RELOC_TAG DT_REL
-#define MACHID EM_MIPS /* ELF e_machine ID value checked */
-
+/* Only used in lib/csu/mips64/boot_md.h */
#define RELOC_DYN(relp, symp, adrp, val) \
do { \
if (ELF_R_TYPE(relp->r_info) == R_MIPS_REL32_64) { \
-/* $OpenBSD: archdep.h,v 1.23 2019/10/23 19:55:09 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.24 2021/11/14 22:07:39 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#define _POWERPC_ARCHDEP_H_
#define RELOC_TAG DT_RELA
-
-#define MACHID EM_PPC /* ELF e_machine ID value checked */
+#define MACHID EM_PPC /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
#include "syscall.h"
#include "util.h"
-/*
- * The following functions are declared inline so they can
- * be used before bootstrap linking has been finished.
- */
static inline void
_dl_dcbf(Elf_Addr *addr)
: : "r" (addr) : "0");
}
+/* Only used in lib/csu/boot.h */
static inline void
RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
}
}
-#define RELOC_GOT(obj, offs)
-
#endif /* _POWERPC_ARCHDEP_H_ */
-/* $OpenBSD: archdep.h,v 1.2 2020/07/18 16:41:43 kettenis Exp $ */
+/* $OpenBSD: archdep.h,v 1.3 2021/11/14 22:07:39 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#define _POWERPC_ARCHDEP_H_
#define RELOC_TAG DT_RELA
-
-#define MACHID EM_PPC64 /* ELF e_machine ID value checked */
+#define MACHID EM_PPC64 /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
#include "syscall.h"
#include "util.h"
-/*
- * The following functions are declared inline so they can
- * be used before bootstrap linking has been finished.
- */
static inline void
_dl_dcbf(Elf_Addr *addr)
: : "r" (addr) : "0");
}
+/* Only used in lib/csu/boot.h */
static inline void
RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
}
}
-#define RELOC_GOT(obj, offs)
-
#endif /* _POWERPC_ARCHDEP_H_ */
-/* $OpenBSD: archdep.h,v 1.2 2021/11/09 21:22:29 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.3 2021/11/14 22:07:39 guenther Exp $ */
/*
* Copyright (c) 2021 Dale Rahn <drahn@openbsd.org>
#define _AARCH64_ARCHDEP_H_
#define RELOC_TAG DT_RELA
-
-#define MACHID EM_RISCV /* ELF e_machine ID value checked */
+#define MACHID EM_RISCV /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
#include "syscall.h"
#include "util.h"
+
+/* Only used in lib/csu/boot.h */
static inline void
RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
}
}
-#define RELOC_GOT(obj, offs)
-
#endif /* _AARCH64_ARCHDEP_H_ */
-/* $OpenBSD: archdep.h,v 1.12 2019/10/23 19:55:09 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.13 2021/11/14 22:07:39 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#define _SH_ARCHDEP_H_
#define RELOC_TAG DT_RELA
-
-#define MACHID EM_SH /* ELF e_machine ID value checked */
+#define MACHID EM_SH /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
#include "syscall.h"
#include "util.h"
-/*
- * The following functions are declared inline so they can
- * be used before bootstrap linking has been finished.
- */
+/* Only used in lib/csu/boot.h */
static inline void
RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
}
}
-#define RELOC_GOT(obj, offs)
-
#endif /* _SH_ARCHDEP_H_ */
-/* $OpenBSD: archdep.h,v 1.26 2017/10/27 16:47:08 mpi Exp $ */
+/* $OpenBSD: archdep.h,v 1.27 2021/11/14 22:07:39 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
#define _SPARC64_ARCHDEP_H_
#define RELOC_TAG DT_RELA
-
-#define MACHID EM_SPARCV9 /* ELF e_machine ID value checked */
+#define MACHID EM_SPARCV9 /* ELF e_machine ID value checked */
#include <elf.h>
#include <machine/reloc.h>
#include "util.h"
+/* Only used in lib/csu/boot.h */
static inline void
RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
}
}
-#define RELOC_GOT(obj, offs)
-
#endif /* _SPARC64_ARCHDEP_H_ */