Opened 13 years ago

Closed 8 years ago

#37 closed defect (fixed)

export for symbols longer than 255 chars

Reported by: ydario Owned by: bird
Priority: normal Milestone: libc-0.6.4
Component: emx Version: 0.6
Severity: normal Keywords:
Cc:

Description

emxbind cannot parse .def files with symbols longer than 255 chars. moddef.h is modified to allow symbols up to 1024 chars (got some 525 chars long). Since OS/2 cannot export symbols longer than 255 chars, the NONAME flag use is required, emxbind stops with fatal error if flag is not used.

Index: include/sys/moddef.h
===================================================================
--- include/sys/moddef.h	(revision 2508)
+++ include/sys/moddef.h	(working copy)
@@ -126,16 +126,16 @@
       } exetype;                  /* EXETYPE */
     struct
       {
-        char entryname[256];
-        char internalname[256];
+        char entryname[1024];
+        char internalname[1024];
         int ordinal;
         int pwords;
         unsigned flags;
       } export;                   /* EXPORTS */
     struct
       {
-        char entryname[256];
-        char internalname[256];
+        char entryname[1024];
+        char internalname[1024];
         char modulename[256];
         int ordinal;
         unsigned flags;
Index: src/emxbind/export.c
===================================================================
--- src/emxbind/export.c	(revision 2508)
+++ src/emxbind/export.c	(working copy)
@@ -43,6 +43,10 @@
 {
   int i;
 
+  if (strlen(exp->entryname)>254 
+      && !(exp->flags & _MDEP_NONAME))
+     error ("symbol %s too long, requires NONAME flag (EXPORTS)", exp->entryname);
+
   for (i = 0; i < export_len; ++i)
     {
       if (strcmp (exp->entryname, export_data[i].entryname) == 0)

Change History (7)

comment:1 Changed 13 years ago by bird

  • Summary changed from aout export for symbols longer than 255 chars to export for symbols longer than 255 chars

This breaks several assumptions in emximp and/or in omflib. So, it'll have to wait till I've done the others or to 0.6.2.

comment:2 Changed 13 years ago by bird

  • Milestone changed from libc-0.6.1 to libc-0.6.2

comment:3 Changed 12 years ago by bird

  • Milestone changed from libc-0.6.2 to libc-0.6.3

comment:4 Changed 12 years ago by bird

  • Milestone changed from libc-0.6.3 to libc-0.6.4

comment:5 Changed 8 years ago by bird

  • Status changed from new to assigned

comment:6 Changed 8 years ago by bird

(In [3703]) moddef.h,emxbind,weakld: Expanded the symbol name fields in libmoddef so that we can parse def-files with long symbols before truncating them (weakld). References #37.

comment:7 Changed 8 years ago by bird

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [3704]) 0.6: Backported r3703: moddef.h,emxbind,weakld: Expanded the symbol name fields in libmoddef so that we can parse def-files with long symbols before truncating them (weakld). Fixes #37.

Note: See TracTickets for help on using tickets.