[PATCH 3/3] gas: re-use config/te-*.h
Jan Beulich
jbeulich@suse.com
Fri Aug 21 13:18:00 GMT 2026
... instead of spelling out all the same things repeatedly.
---
Some config/te-*.h use
#ifdef OBJ_HEADER
#include OBJ_HEADER
#else
#include "obj-format.h"
#endif
while others use(d) simply
#include "obj-format.h"
Why this difference?
--- a/gas/config/te-armeabi.h
+++ b/gas/config/te-armeabi.h
@@ -21,7 +21,4 @@
#define FPU_DEFAULT FPU_ARCH_SOFTVFP
#define EABI_DEFAULT EF_ARM_EABI_VER5
-#define LOCAL_LABELS_DOLLAR 1
-#define LOCAL_LABELS_FB 1
-
-#include "obj-format.h"
+#include "te-generic.h"
--- a/gas/config/te-dragonfly.h
+++ b/gas/config/te-dragonfly.h
@@ -24,7 +24,4 @@
DragonFlyBSD kernel uses "/" to mean division. (What a concept!) */
#define TE_DragonFly 1
-#define LOCAL_LABELS_DOLLAR 1
-#define LOCAL_LABELS_FB 1
-
-#include "obj-format.h"
+#include "te-generic.h"
--- a/gas/config/te-freebsd.h
+++ b/gas/config/te-freebsd.h
@@ -24,7 +24,4 @@
FreeBSD kernel uses "/" to mean division. (What a concept!) */
#define TE_FreeBSD 1
-#define LOCAL_LABELS_DOLLAR 1
-#define LOCAL_LABELS_FB 1
-
-#include "obj-format.h"
+#include "te-generic.h"
--- a/gas/config/te-go32.h
+++ b/gas/config/te-go32.h
@@ -19,13 +19,9 @@
#define TE_GO32
-#define LOCAL_LABELS_DOLLAR 1
-#define LOCAL_LABELS_FB 1
-
/* GAS should treat '.align value' as an alignment of 2**value. */
#define USE_ALIGN_PTWO
#define COFF_LONG_SECTION_NAMES
-/* These define interfaces. */
-#include "obj-format.h"
+#include "te-generic.h"
--- a/gas/config/te-haiku.h
+++ b/gas/config/te-haiku.h
@@ -24,7 +24,4 @@
haiku kernel uses "/" to mean division. (What a concept!) */
#define TE_Haiku 1
-#define LOCAL_LABELS_DOLLAR 1
-#define LOCAL_LABELS_FB 1
-
-#include "obj-format.h"
+#include "te-generic.h"
--- a/gas/config/te-hppa64.h
+++ b/gas/config/te-hppa64.h
@@ -19,7 +19,4 @@
#define TARGET_ARCH_SIZE 64
-/* Labels are not required to have a colon for a suffix. */
-#define LABELS_WITHOUT_COLONS 1
-
-#include "obj-format.h"
+#include "te-hppa.h"
--- a/gas/config/te-hppalinux64.h
+++ b/gas/config/te-hppalinux64.h
@@ -17,8 +17,6 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#define TE_LINUX
#define TARGET_ARCH_SIZE 64
-#define LOCAL_LABELS_FB 1
-#include "obj-format.h"
+#include "te-linux.h"
--- a/gas/config/te-macos.h
+++ b/gas/config/te-macos.h
@@ -19,10 +19,4 @@
#define TE_POWERMAC 1
-/* Added these, because if we don't know what we're targeting we may
- need an assembler version of libgcc, and that will use local
- labels. */
-#define LOCAL_LABELS_DOLLAR 1
-#define LOCAL_LABELS_FB 1
-
-#include "obj-format.h"
+#include "te-generic.h"
--- a/gas/config/te-pep.h
+++ b/gas/config/te-pep.h
@@ -20,10 +20,4 @@
#define TE_PEP
#define COFF_WITH_pex64
-#define TE_PE
-#define LEX_AT (LEX_BEGIN_NAME | LEX_NAME) /* Can have @'s inside labels. */
-
-/* The PE format supports long section names. */
-#define COFF_LONG_SECTION_NAMES
-
-#include "obj-format.h"
+#include "te-pe.h"
--- a/gas/config/te-pepaarch64.h
+++ b/gas/config/te-pepaarch64.h
@@ -20,10 +20,4 @@
#define TE_PEP
#define COFF_WITH_peAArch64
-#define TE_PE
-#define LEX_AT (LEX_BEGIN_NAME | LEX_NAME) /* Can have @'s inside labels. */
-
-/* The PE format supports long section names. */
-#define COFF_LONG_SECTION_NAMES
-
-#include "obj-format.h"
+#include "te-pe.h"
--- a/gas/config/te-solaris.h
+++ b/gas/config/te-solaris.h
@@ -19,10 +19,7 @@
#define TE_SOLARIS
-#define LOCAL_LABELS_DOLLAR 1
-#define LOCAL_LABELS_FB 1
-
-#include "obj-format.h"
+#include "te-generic.h"
/* The Sun linker doesn't merge read-only and read-write sections into
a single section so we must force all EH frame sections to use the
--- a/gas/config/te-tmips.h
+++ b/gas/config/te-tmips.h
@@ -20,21 +20,10 @@
/* This file is te-tmips.h and is intended to provide support for
traditional mips targets like mips-dde-sysv4.2MP (Supermax ) ,
- mips-sni-sysv4* (Sinix) etc. The base for this file is te-generic.h.
+ mips-sni-sysv4* (Sinix) etc.
Created by Koundinya.K < kk@ddeorg.soft.net > with the help of
Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>. */
-/* Added these, because if we don't know what we're targeting we may
- need an assembler version of libgcc, and that will use local
- labels. */
-
#define TE_TMIPS 1
-#define LOCAL_LABELS_DOLLAR 1
-#define LOCAL_LABELS_FB 1
-/* these define interfaces */
-#ifdef OBJ_HEADER
-#include OBJ_HEADER
-#else
-#include "obj-format.h"
-#endif
+#include "te-generic.h"
--- a/gas/config/te-vxworks.h
+++ b/gas/config/te-vxworks.h
@@ -19,12 +19,5 @@
02110-1301, USA. */
#define TE_VXWORKS 1
-#define LOCAL_LABELS_DOLLAR 1
-#define LOCAL_LABELS_FB 1
-/* these define interfaces */
-#ifdef OBJ_HEADER
-#include OBJ_HEADER
-#else
-#include "obj-format.h"
-#endif
+#include "te-generic.h"
More information about the Binutils
mailing list