SebRmv Posted August 15, 2014 Report Share Posted August 15, 2014 Hello, I am trying to switch from aln to rln. I am missing one option of aln which is the flag -y <incdir> that allows to specify include directories for object and archive files. Is there some equivalent flag in rln? If not, can you please add this option? Seb Link to comment Share on other sites More sharing options...
SebRmv Posted August 15, 2014 Author Report Share Posted August 15, 2014 Hello, I am trying to switch from aln to rln. I am missing one option of aln which is the flag -y <incdir> that allows to specify include directories for object and archive files. Is there some equivalent flag in rln? If not, can you please add this option? Seb Read the sources and seen that RLNPATH environment variable can be set. So I wrote a small patch to add -y flag, attached to this message. Now another question: would it be difficult to add support for linking with archive files? For the moment, I get "rmvlib.a is not a supported object file" error, which is a bit annoying... 0001_Patch_to_add_y_option.patch.zip Link to comment Share on other sites More sharing options...
Shamus Posted August 20, 2014 Report Share Posted August 20, 2014 Thanks for the patch Seb! As far as archive file linking goes, could you file that bug in my bug tracker? That way, I can keep track of it better. It's located at: http://jlhconsulting.gotdns.com/bugs/ . Be sure to file it under the "RLN" product. Link to comment Share on other sites More sharing options...
SebRmv Posted August 28, 2014 Author Report Share Posted August 28, 2014 Thanks Shamus. Actually, I don't really need this anymore because... As I had a few days of vacation, I made my own linker using a modern language (yes, you guessed it: OCaml !) The project is hosted on github and is GPLv3. Of course, it needs a lot of testing and all that... but I managed to link some of my programs successfully, so I guess it is a good start The supported modes are (for now): - partial linking (local and debug symbols are pruned) -> O files - absolute linking -> ABS files with/without header and COFF files (no debug symbol, no relocatable segment) Link to comment Share on other sites More sharing options...
SebRmv Posted August 29, 2014 Author Report Share Posted August 29, 2014 Thanks Shamus. Actually, I don't really need this anymore because... As I had a few days of vacation, I made my own linker using a modern language (yes, you guessed it: OCaml !) The project is hosted on github and is GPLv3. Of course, it needs a lot of testing and all that... but I managed to link some of my programs successfully, so I guess it is a good start The supported modes are (for now): - partial linking (local and debug symbols are pruned) -> O files - absolute linking -> ABS files with/without header and COFF files (no debug symbol, no relocatable segment) An alpha version is available here for Windows users. Your feedback is welcome Link to comment Share on other sites More sharing options...
Orion_ Posted January 12, 2015 Report Share Posted January 12, 2015 I stumbled across a nasty bug this weekend, I almost went crazy ... It appears to be a linking problem from RLN, between C object code (from VBCC) and ASM object code from RMAC. In my C code I had a function pointer declared and initialised like this: u16 (*iclTMtiledraw_callback)(u16 tile); iclTMtiledraw_callback = NULL; in my ASM code I used this function pointer, but I also had a declaration of it in the BSS: move.l _iclTMtiledraw_callback,a1 .bss .globl _iclTMtiledraw_callback _iclTMtiledraw_callback: ds.l 1 My mistake here was that I forgot the "extern" in the C code. So the function pointer was declared 2 times ! and the address used in the C code was different from the address in the ASM code (hence the random crash depending on the init of the bss) Now, why didn't RLN showed me an error saying that this variable was declared 2 times and that there was a conflict between them ? That would have saved me 2 days of headaches Good thing is, I was convinced that the problem was from the Blitter which I use a lot, so I shielded my code about this, now I guess, there won't be any problem related to "wait for the blitter to finish before modifying its registers". Link to comment Share on other sites More sharing options...
Michael Posted January 12, 2015 Report Share Posted January 12, 2015 H Orion, In my C code I had a function pointer declared and initialised like this: u16 (*iclTMtiledraw_callback)(u16 tile); iclTMtiledraw_callback = NULL; in my ASM code I used this function pointer, but I also had a declaration of it in the BSS: move.l _iclTMtiledraw_callback,a1 .bss .globl _iclTMtiledraw_callback _iclTMtiledraw_callback: ds.l 1 Now, why didn't RLN showed me an error saying that this variable was declared 2 times and that there was a conflict between them ? I think, your C Code has a variable which is part of the data segment because it is a initialized global variable. Your assembler variable is in a different segment. So it was no problem for the linker to have the variable twice, one i the data segment and one in the bss segment. I noticed this problem many years ago with a different compiler. Best regards Michael Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now