Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2001-06

Re: An idea how to fix lost exports in smart-linked

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Peter Vreman
>That is very difficult, because normally the internal assembler is used that will

create

>the objectfiles directly in memory to write a signle library when finished. Is it really so? May be, I mistake, but I think that only .ow object files are creating

by
internal assembler and

static library is building using arw utility. At least if I use -s option I get a folder

with a set of .ow files.

That is when you use -s (or -a). But without these options the creation of the library is done internally.

Just try it to remove arw.exe and compile a smartlinked unit.

Reply by email

Pavel V. Ozerski
to Peter Vreman

It is possible, to supress splitting of .edata's into different modules by smartlinking? If is it easy to keep all .edata's in one module, only one global name would be enough to prevent losing exports by smartlinking. For example, it would be possible to introduce an obligatory module with standard label (e.g., .global $$EXPORTS$$) and add reference to this label directly to startup file or to PASCALMAIN. If output file must contain no exports, this module will contain only this label. If linking is not smart, this label will also present in big .ow file. May be, it is a solution? But how easy is supressing of .edata's splitting?

Reply by email

Pierre Muller
to Pavel V. Ozerski

At 12:28 06/06/01 , vous avez écrit:

Show quoted text 10 lines
It is possible, to supress splitting of .edata's into different modules by smartlinking? If is it easy to keep all .edata's in one module, only one global name would be enough to prevent losing exports by smartlinking. For example, it would be possible to introduce an obligatory module with standard label (e.g., .global $$EXPORTS$$) and add reference to this label directly to startup file or to PASCALMAIN. If output file must contain no exports, this module will contain only this label. If linking is not smart, this label will also present in big .ow file. May be, it is a solution? But how easy is supressing of .edata's splitting?

Yes, that is the best solution.
What we need it to disable the assembler file change for the .edata section add some label that willo be referenced in the same object file as the PASCALMAIN
and that should solve the whole trouble !

Pavel, could you try to send a patch for this ?

Reply by email

Peter Vreman
It is possible, to supress splitting of .edata's into different modules by smartlinking?

If is it easy to keep all .edata's in one

module, only one global name would be enough to prevent losing exports by smartlinking.

For example, it would be possible

to introduce an obligatory module with standard label (e.g., .global $$EXPORTS$$) and

add
reference to this label directly to

startup file or to PASCALMAIN. If output file must contain no exports, this module will

contain only this label. If linking is not

smart, this label will also present in big .ow file. May be, it is a solution? But how

easy is supressing of .edata's splitting?

I've a fix for the current 1.0.5 compiler ready. I'll commit it tonight.

Reply by email