#pragma comment (lib, ...)

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Oct 10 11:56:30 PDT 2012


On 10-Oct-12 22:54, H. S. Teoh wrote:
> On Wed, Oct 10, 2012 at 08:56:49AM -0700, Walter Bright wrote:
>> On 10/10/2012 8:19 AM, Simen Kjaeraas wrote:
>>> On 2012-10-10, 16:19, Walter Bright wrote:
>>>> Some object module formats do not have the ability to embed a library
>>>> reference in them. Elf (cough cough), Mach-O (wheeze)
>>>
>>> ELF has .comment and .note sections. While they're not exactly intended
>>> for the purpose, they seem to fit the bill?
>>>
>>> It'd of course require a linker to know what to do with the data, but
>>> it seems to me this would not interfere with other uses.
>>
>> Exactly. Embedding it in a comment section accomplishes exactly
>> nothing if the linker ignores it.
> [...]
>
> I thought the point was that linkers that *did* understand it will do
> the right thing, and linkers that don't will fall back to the
> traditional way (require specifying libraries on the command-line).
>

BTW making the smart linker driver should be relatively easy: just get 
the special section contents out of passed object files and turn that 
into a full blown set of flags for a dumb linker.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list