Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Feb 2024 16:45:06 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 9792d605235a - stable/14 - sys/sys: Check for __ASSEMBLER__ in elf_common.h
Message-ID:  <202402191645.41JGj6Sb095362@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=9792d605235ab09113053f845d52aeeff24a58e7

commit 9792d605235ab09113053f845d52aeeff24a58e7
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-10-12 09:45:43 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2024-02-19 13:10:51 +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
    
    (cherry picked from commit f39010b1393d471f1c59195acde5d95cdb66847c)
---
 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?202402191645.41JGj6Sb095362>