[PATCH] D35352: [ELF] - Implement filter library support (-F / --filter)

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 02:19:21 PDT 2017


>>Is the order important across options?
>>
>>What should we get for "-f foo -F bar -f zed"?
>>
>>Cheers,
>>Rafael
>
>That should depend on runtime linker implementation I think,
>both gold and bfd will output:
>
> 0x000000007fffffff (FILTER)             Filter library: [bar]
> 0x000000007ffffffd (AUXILIARY)          Auxiliary library: [zed]
> 0x000000007ffffffd (AUXILIARY)          Auxiliary library: [foo]
>
>I think we can follow for now.
>
>George.

glibc just scans tags one by one and proccesses DT_AUXILIARY/DT_FILTERS together it seems:
https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/dl-deps.c;h=1b8bac65932a771359a3d92d0204c650b949defb;hb=HEAD#l295

So I believe keeping the same emiting order as gnu linker has should be safest way.

George.


More information about the llvm-commits mailing list