Files
binutils-gdb/include/sframe-internal.h
Indu Bhagat 61be442011 gas: ld: sframe: add new internal header
for SFRAME_V2_GNU_AS_LD_ENCODING_FLAGS.

The intention of creating an abstraction like
SFRAME_V2_GNU_AS_LD_ENCODING_FLAGS is to address the concern that there
should be a central place to enforce harmonious flags between GNU as and
ld.  At the moment, the only flag that needs to be enforced is
SFRAME_F_FDE_FUNC_START_PCREL.

sframe.h and sframe-api.h are installed headers by libsframe for the
specification and implementation respectively.  Adding a definition like
SFRAME_V2_GNU_AS_LD_ENCODING_FLAGS does not fit in either.  Create a
new internal header instead to keep the definition uncoupled from
sframe.h and sframe-api.h.  Rename the previously added
SFRAME_F_LD_MUSTHAVE_FLAGS to define the new
SFRAME_V2_GNU_AS_LD_ENCODING_FLAGS.

bfd/
	* elf-sframe.c (_bfd_elf_merge_section_sframe): Use the new
	internal header and SFRAME_V2_GNU_AS_LD_ENCODING_FLAGS.
gas/
	* gen-sframe.c (output_sframe_internal): Likewise.
include/
	* sframe-api.h (SFRAME_F_LD_MUSTHAVE_FLAGS): Move from..
	* sframe-internal.h: ..to here.  New file.
2025-07-09 01:40:41 -07:00

31 lines
1.1 KiB
C

/* Internal header for SFrame.
Used by GNU as and ld.
Copyright (C) 2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _SFRAME_INTERNAL_H
#define _SFRAME_INTERNAL_H
#include "sframe.h"
/* Set of flags which are required to be harmonious between GNU as and ld. All
objects participating in the link for GNU ld must have these flags set. */
#define SFRAME_V2_GNU_AS_LD_ENCODING_FLAGS \
(SFRAME_F_FDE_FUNC_START_PCREL)
#endif /* _SFRAME_INTERNAL_H */