Xref: utzoo comp.sys.amiga:23765 comp.sys.amiga.tech:2068 Path: utzoo!attcan!uunet!mcvax!enea!kth!draken!chalmers!tekn01.chalmers.se!d88_pata From: d88_pata@tekn01.chalmers.se (PATRIK PETTERSSON) Newsgroups: comp.sys.amiga,comp.sys.amiga.tech Subject: Re: Interesting guru using Blink.. Message-ID: <226@tekn01.chalmers.se> Date: 5 Oct 88 23:31:09 GMT References: <834@kuling.UUCP> Organization: Chalmers Univ. of Technology, Gothenburg, Sweden Lines: 47 In article <834@kuling.UUCP>, jonasf@kuling.UUCP (Jonas Flygare) writes: > One of my friends told me the other day he couldn't link a program he > wrote, because Blink would guru on the object file. I didn't believe him > so he gave me a copy, and sure enough, my blink (2.7, the one that came > with Lattice C, vers 4.0) also gave up on the file. > All I could make of it was that Blink guru's somewhere in pass two on > the file. I enclose a shar script with the source, and a uuencoded copy > of the object file. Source is assembly language, assembler used is > asm (Lattice 4.0 version). > I suspect there are some errors in the source, and if you like to pointe > them out in email, I'll forward them. (He claims it is his first attempt to > do serious programming on his Amy.. And he *refuses* to use C.. :-) > But apart from that, I am ratehr surprised at the guru, I would expect > Blink to come up with an error message, and then abort linking.. > Whoever out there makes Blink tick, and run, is this a bug?? > This is exactly the same problem I had, some time ago. I were linking several small assembler-generated objectfiles with Blink, when suddenly it Gurued! After many, many frustrating hours of testing and reassembling, I finally saw a pattern. It appeared to have something to do with the length of the different hunks in the objectfile. I don't recall the exact reason, but I do remember that it had something to do with alignment. Of, course Blink should *never* guru, but this time it is due to bad programming practice. The key-issue is how your friend declares strings. He uses the fast-and-ugly method: dc.b 'Text',0 The proper way to declare strings in assembler on the Amiga is as follows: . . . INCLUDE "exec/strings.i" . . . . . Label: STRING 'The text' . . This trick saved my day. Hopefully it will save your friend's too! Patrik Pettersson Chalmers University Of Technology Sweden