Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl27 (2.7.0-18) unstable; urgency=medium
 .
   * Version_2_7_0pre21
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2024-02-24

--- gcl27-2.7.0.orig/git.tag
+++ gcl27-2.7.0/git.tag
@@ -1,2 +1,2 @@
-"Version_2_7_0pre20"
+"Version_2_7_0pre21"
 
--- gcl27-2.7.0.orig/h/compbas2.h
+++ gcl27-2.7.0/h/compbas2.h
@@ -31,7 +31,7 @@ typedef dcomplex c128;
 typedef object o32;
 
 typedef union {int8_t i;uint8_t u;n8 n;} u8;
-typedef union {int16_t i;uint16_t u;n16 n;} u16;
+typedef union {int16_t i;uint16_t u;n16 n;}  __attribute__((__packed__)) u16;
 typedef union {
   int32_t i;
 #if SIZEOF_LONG!=4
@@ -40,15 +40,15 @@ typedef union {
 #else
   object o;
 #endif
-  float f;} u32;
+  float f;}  __attribute__((__packed__)) u32;
 typedef union {
 #if SIZEOF_LONG!=4
   int64_t i;
   object o;
 #endif
   double f;
-  fcomplex c;} u64;
-typedef union {dcomplex c;} u128;
+  fcomplex c;}  __attribute__((__packed__)) u64;
+typedef union {dcomplex c;}  __attribute__((__packed__)) u128;
 
 #define U8_DEFINED
 #endif
--- gcl27-2.7.0.orig/o/makefun.c
+++ gcl27-2.7.0/o/makefun.c
@@ -87,10 +87,10 @@ DEFUN("INIT-FUNCTION",object,fSinit_func
   d=data!=Cnil ? data : m;
   i=sSPinit;
   i=i ? i->s.s_dbind : i;
-  if (is_text_addr(addr)||get_pageinfo(addr))
+  if (is_text_addr(addr)||get_pageinfo(addr)||!i||i==OBJNULL)
     s=addr;
   else {
-    massert(i && i!=OBJNULL && type_of(addr)==t_fixnum);
+    massert(type_of(addr)==t_fixnum);
     s=i->v.v_self[fix(addr)];
   }
   z=type_of(sc)==t_cons && sc->c.c_car==sSmacro; /*FIXME limited no. of args.*/
--- gcl27-2.7.0.orig/o/sfaslelf.c
+++ gcl27-2.7.0/o/sfaslelf.c
@@ -60,10 +60,15 @@ License for more details.
 #define LOCAL_SYM(sym) ELF_ST_BIND(sym->st_info)==STB_LOCAL
 #define EXT_SYM(sym,st1) (ELF_ST_BIND(sym->st_info)==STB_GLOBAL||	\
 			  ELF_ST_BIND(sym->st_info)==STB_WEAK||		\
-			  GCC_SYM(sym,st1))
+			  GCC_SYM(sym,st1)||				\
+			  PSPEC_SYM(sym,st1))
+/*e.g. arm soft float functions*/
 #define GCC_SYM(sym,st1) (ELF_ST_BIND(sym->st_info)==STB_LOCAL &&	\
 			  ELF_ST_TYPE(sym->st_info)==STT_FUNC &&	\
 			  st1[sym->st_name]=='_')
+/*e.g. parisc millicode*/
+#define PSPEC_SYM(sym,st1) (ELF_ST_BIND(sym->st_info)==STB_LOCAL &&	\
+			    ELF_ST_TYPE(sym->st_info)>=STT_LOPROC)
 
 #define MASK(n) (~(~0ULL << (n)))
 
--- gcl27-2.7.0.orig/o/sfasli.c
+++ gcl27-2.7.0/o/sfasli.c
@@ -95,14 +95,15 @@ build_symbol_table_bfd(void) {
 #endif /* special_rsym */
 
 static void *min_text;
-extern char etext/* ,edata,end */;
+extern void *data_start;
+/* extern char etext,edata,end,_data_start_; */
 
 int
 is_text_addr(void *p) {
   extern int initializing_boot;
-  if (!min_text) return 1;/*FIXME build_symbol_table before initlisp*/
+  /* if (!min_text) return 1;/\*FIXME build_symbol_table before initlisp*\/ */
   if (initializing_boot) return 1;/*FIXME*/
-  return p>=min_text && p<(void *)&etext ? 1 : 0;
+  return p>=min_text && p<data_start && !is_bigger_fixnum(p) ? 1 : 0;
 }
 
 LFD(build_symbol_table)(void) {
