|
|
1.1 ! root 1: /usr/src/ld/Changes 1/25/90 ! 2: ! 3: Thu Jan 25 15:26:27 1990 PST ! 4: pass2.c ! 5: Executables built by the Inetco loader fail with a segmentation ! 6: violation when one of the linked objects ends with an odd-sized ! 7: segment. Because relocation and symbol segments follow the ! 8: code and data segments, this happens only when a module contains ! 9: no external symbols and defines an odd-sized last segment. ! 10: For the source foo.c module containing the single line ! 11: static char c[] = "12"; ! 12: cc creates an object foo.o with PRVD segment of size 4 (not 3), ! 13: but it writes only the 3 data bytes '1', '2', '\0' to it. ! 14: Since no BSS, symbol or relocation segments follow, the object ends ! 15: after the '\0'. Similary for a source ! 16: static f() { int i; i++ } ! 17: which creates a PRVI segment of length 16 with 15 data bytes. ! 18: This bug could be fixed either in the compiler output writer ! 19: n2/i8086/outcoh.c or in the loader. I choose the latter approach, ! 20: changing the code which copies segments in pass2.c. In the process, ! 21: I made the code vastly more efficient. ! 22: Makefile ! 23: In CFLAGS, changed -DBREADBOX=$BREADBOX to -DBREADBOX=$(BREADBOX). ! 24: The old version was a mistake which produced -DBREADBOX=READBOX ! 25: during compilations rather than -DBREADBOX=16384. ! 26: ! 27: Thu Mar 29 10:35:01 1990 PST ! 28: main.c ! 29: Removed RCS statics (including Inetco copyright) and recompiled.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.