Opened 19 years ago

Closed 14 years ago

#37 closed defect (fixed)

export for symbols longer than 255 chars

Reported by: Yuri Dario 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 by bird, 19 years ago

Summary: aout export for symbols longer than 255 charsexport 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 by bird, 19 years ago

Milestone: libc-0.6.1libc-0.6.2

comment:3 by bird, 18 years ago

Milestone: libc-0.6.2libc-0.6.3

comment:4 by bird, 17 years ago

Milestone: libc-0.6.3libc-0.6.4

comment:5 by bird, 14 years ago

Status: newassigned

comment:6 by bird, 14 years ago

(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 by bird, 14 years ago

Resolution: fixed
Status: assignedclosed

(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.