Jump to content
Sign in to follow this  
edt

Linker Internal Error: Cant Find Goto Destination

Recommended Posts

I have a very finicky problem involving an inline function. I can describe the problem, but unfortunately I could not duplicate it in a small test case, and I don't feel comfortable sending the entire body of source code since it's proprietary. I can work with you if you have trouble tracking it down and need any more information from my end.

 

I created an inline function "inline void init_PLC_rx(void)" defined in a header file and called from my ISR. When I compiled the project, I got this error: "Linker Internal Error: Cant find Goto destination". I tried renaming the function, changing the function body, replacing the call with a different inline call defined in the same header file as init_PLC_rx, and moving the call itself around in the ISR, and for all except the last of those the problem disappeared. When I moved the call around, it seemed to always work below a certain point a few lines down and not at all above. I tried replacing a line in the function body (that should compile to 1 instruction, maybe with bank switching) with 0-6 nop() calls, removing lines, adding nop()s at the end, and everything compiled except the original version. It seems that even the same size code won't reproduce the problem (since I tried replacing with nops).

 

I'm using BoostC 6.70 under MPLAB on Windows XP. The target device is a PIC16F877A.

Share this post


Link to post
Share on other sites

Oddly enough, I made a copy of the entire project directory, everything identical except the name of the containing directory, and it built without error. The original still has the problem, though.

Edited by edt

Share this post


Link to post
Share on other sites

emte

It is not that pesky path length bug issue that MPLAB has is it?

The MPLAB path length problem is cause by using .COD as the debug output file.

In BoostC we use a .COF file for the debug output so there is no issue with path length :(

 

Regards

Dave

Share this post


Link to post
Share on other sites

edt,

 

I don't feel comfortable sending the entire body of source code since it's proprietary.  I can work with you if you have trouble tracking it down and need any more information from my end.

Its going to be extremely difficult to track this down unless we can reproduce it.

You can be assured that we do have a policy of non-disclosure of any code we receive unless we receive explicit permission to do so.

 

So if you can send a project that demonstrates the problem, please do so to: support@sourceboost.com

 

Regards

Dave

Share this post


Link to post
Share on other sites
Its going to be extremely difficult to track this down unless we can reproduce it.

I expected as much. I wish I could do more because it seems to be a very hard bug to stumble onto, but I relayed what you said about non-disclosure to my superior and he still doesn't like the idea.

 

Do the .obj files have source-level debugging information in them? I didn't see an option to enable/disable debugging for BoostC. Maybe if they don't or there's some way to strip the information, I could try to get permission to send you the .obj files themselves (assuming the debug info has nothing to do with reproducing the bug). We're still in development, so I don't think we need to be too protective of the machine code. I verified that two of the .obj files alone are enough to trigger the bug in BoostLink.

Share this post


Link to post
Share on other sites

edt,

....

....

I verified that two of the .obj files alone are enough to trigger the bug in BoostLink.

The .obj files maybe enough to find the problem. Send what you can.

 

Regards

Dave

Share this post


Link to post
Share on other sites

edt,

Sent.  Hope that's enough to track it down.

Hopefully you received an email a couple of days ago from us requesting more information??

 

Regards

Dave

Share this post


Link to post
Share on other sites

I had the same problem with one of my projects. There was a function, optimized as inline by the compiler, and called from

my ISR, which gave me the same error. I tried moving the project folder to a different place, and it compiled successfully.

 

I tried with both shorter and longer path, it didn't matter, it always compiled successfully, except in the original folder.

 

At last, I found a way to make it compile in the original folder:

I got a static variabile declared within the function, it was enough to move it outside, to make it work.

 

Compiler: BoostC version 6.70 release candidate

Operating system: XP SP2

Device: PIC16F685

 

Please note: with compiler BoostC version 6.60 I had no such problem!

 

hope I was helpful...

Share this post


Link to post
Share on other sites

chmotori,

I had the same problem with one of my projects. There was a function, optimized as inline by the compiler, and called from

my ISR, which gave me the same error. I tried moving the project folder to a different place, and it compiled successfully.

 

I tried with both shorter and longer path, it didn't matter, it always compiled successfully, except in the original folder.

 

At last, I found a way to make it compile in the original folder:

I got a static variabile declared within the function, it was enough to move it outside, to make it work.

 

Compiler: BoostC version 6.70 release candidate

Operating system: XP SP2

Device: PIC16F685

 

Please note: with compiler BoostC version 6.60 I had no such problem!

 

hope I was helpful...

Any chance you can provide a project demonstrating the issue?

 

Regards

Dave

Share this post


Link to post
Share on other sites
chmotori,

Any chance you can provide a project demonstrating the issue?

 

Regards

Dave

 

no problem, as you said previously, if you have such a policy of non-disclosure,

I can send the whole folder.

 

Just confirm me I have to send it to support@sourceboost.com.

Share this post


Link to post
Share on other sites

chmotori,

no problem, as you said previously, if you have such a policy of non-disclosure,

I can send the whole folder.

We never disclose any code or projects we received unless we have been given explicit permission to do so.

 

Just confirm me I have to send it to support@sourceboost.com.
Yes thats the place to send it.

Also we will need to know the exact path to the project that causes the problem.

 

Regards

Dave

Share this post


Link to post
Share on other sites
Yes thats the place to send it.

Also we will need to know the exact path to the project that causes the problem.

 

Regards

Dave

 

ok, sent.

 

if you need further information, please send me an e-mail

(in case I forget to get a look at the messages in the forum).

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...