[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] LDG guide



Hi,

On keskiviikko 28 marraskuu 2012, Miro Kropáček wrote:
> > I browsed through it and this stuck to my eye:
> > "Yeah kids, mintlib is huge and bloated in combination with ineffective
> > a.out format."
> > 
> > a.out format makes only few bytes difference for a linked program
> > which is stripped.  MiNTlib using binaries are larger because MiNTlib
> > has more features than the other libraries.
> 
> With that (not exactly accurate) statement I wanted to point out on
> another thing -- a.out works (AFAIK) only on "file level", i.e. if you
> have 10 functions in 1 file, and you need one function from the set,
> whole file is linked. Typical example is printf(), it has so many (file)
> dependencies that if you make one simple Hello World, it links in tens
> of KBs.

Are you claiming that Pure-C linker doesn't have the same issue,
that it somehow extracts just the relevant functions and only the static
variables they need from the object files, instead of the full
object code?

Besides, a quick look at MiNTlib sources (and e.g. Linux Glibc sources)
shows that typically each of the its source files has just one function
and static helper functions needed by it.

I think that in MiNTlib case the problem is just that better compatibility
+ MiNT unix stuff support at program startup and better error handling
(including error output?) pull in quite a lot of functionality from rest
of the library.

(You can use minimal.h and -nostdlib to get rid of extra library stuff.)


	- Eero