Hello Arkady,

>>>      Small optimization: because BC doesn't knows, that exit() doesn't
BO>> I don't think optimizing exeflat.exe's size is very important though ;)

>      Sure. :) But why not make more optimal code from scratch in any case,
> without thinking "will this code often used"?
And why not leave *existing* code as is - without wasting mental and
ethernet bandwidth on it ?

>>> LG> +  qsort(reloc, header.exRelocItems, sizeof(reloc[0]), compReloc);
>>>      Why to spend extra time for sorting relocations?
BO>> I think it's easier to read the output that way. Tom's idea.
BO>> Does qsort() really take a long time for you in exeflat? I find that hard
BO>> to believe, for just ~70 relocations.

>      Of course, qsort() if very fast algo (except some specific cases, when
> it is O(N^2)), but why to do _any_ extra action, when unnecessary? :)
it's not unnecessary - else I wouldn't have written it.

> Especially, I suggest, (most) linkers do own sorting anyway?
I call people who 'suggest' somethintg that is plain wrong (and they could
have seen that themself) idiots.

>      Ok, ok, above questions are not critical and mostly rhetorical.
but give some insight.

>      Hm. I think for simplicity and safety, exeflat should itself move
> relocation table from executable's header inside executable itself, so that
> it may be reused by MoveKernel(). This allows to eliminate manual table at
> kernel.asm:__HMARelocationTableStart.


>      (Yes, I know __HMARelocationTableStart is not plain relocation table,
> but jump/code table, with jmps and calls to EnableA20. But table from header
> may be copied (after fixing) into "secondary" table. This allows to make
> code, which is more relocatable and may make cross-segments calls and
> accesses. This also solves issues with standard library routines, which may
> be used both from non-relocatable low code and from relocatable code.)

if you can write down a simpler and saver method to do that - fine.
else - see my bandwidth comment...

tom




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to