Date: Fri, 20 Oct 2023 15:45:23 GMT From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f39010b1393d - main - sys/sys: Check for __ASSEMBLER__ in elf_common.h Message-ID: <202310201545.39KFjNZo004977@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f39010b1393d471f1c59195acde5d95cdb66847c commit f39010b1393d471f1c59195acde5d95cdb66847c Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2023-10-12 09:45:43 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2023-10-20 15:36:28 +0000 sys/sys: Check for __ASSEMBLER__ in elf_common.h When preprocessing assembly files with clang or gcc the __ASSEMBLER__ macro is defined. Check for this as an alternative to LOCORE in elf_common.h so it can be included by .S files. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42224 --- sys/sys/elf_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index ce82734833cf..934f66fee953 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -44,7 +44,7 @@ * not include the padding. */ -#ifndef LOCORE +#if !defined(LOCORE) && !defined(__ASSEMBLER__) typedef struct { u_int32_t n_namesz; /* Length of name. */ u_int32_t n_descsz; /* Length of descriptor. */ @@ -112,7 +112,7 @@ typedef Elf_Note Elf_Nhdr; * The header for GNU-style hash sections. */ -#ifndef LOCORE +#if !defined(LOCORE) && !defined(__ASSEMBLER__) typedef struct { u_int32_t gh_nbuckets; /* Number of hash buckets. */ u_int32_t gh_symndx; /* First visible symbol in .dynsym. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310201545.39KFjNZo004977>