Max size of the executable on QNX OS

Hello,

Can anyone please tell me what is maximum size of the executable that can be built and will run on QNX (not the image but the executable using qcc/ld). My libraries are growing upto 200MB and all of these I need to link.

Previously I built an executable of 20MB which can run on QNX and succeeded in running it.

Thanks in advance,
Vish.

I would guess the maximum to be 2Gig.

I have seen 200MB large executeables (with debug info, though) run. However, if you really have that much code, probably you have a major design issue. ;)
You also could try linking statically. Further you could try to use the IDE’s System Builder ‘System Optimizer’ feature. It kicks out un-used functions of Shared Libraries.

Thanks for the answer.

I am facing one more problem slightly associated with this one,
I have around 250 archives (.a’s - each .a has around 25 .o’s approx.). I need to link all of them together to build a final executable on QNX v6.3. I am finding it hard to link all of them.

The linker gives me lot undefined references even though the definitions are present in the .a file. If I re-include that archive those undefined references are going away and entirely different undefined references are coming. I am doing the above from quite some time and I have been re-including the libs as and when required. I tried using qcc and gcc. Then link errors are entirely different.

Can anyone suggest me a solution for this.

Regards,
Vish.

The order in which libraries are specified is important.

Why 2 ? I would think it would be close (but not actually) 4GB.

If you have circular references (i.e. funcA in archive1, references funcB in archive2, which references funcA in archive1) then you will need to include multiple references to each archive that participates in a circular reference.

if you have a lot of circular references, the design sounds peculiar.

I don’t think the FS can handle files bigger then 2Gig. Maybe you can get around this by using share object.

But as I said in my first post, i’m guessing it’s 2Gig :wink:

Oh, I see, your talking about the maximum size of the executable image on the filesystem. I was talking about the maximum size of the executable image in memory.

Since an application is typically made of many shared objects you can normally get around the filesystem limitation; but since the OP was talking about a statically linked exec I see your point…