PATCH/RFC: ld add -p/-P options

Matt Rice ratmice@gmail.com
Sat Sep 12 15:21:00 GMT 2009


On Mon, Aug 31, 2009 at 10:27 AM, Ian Lance Taylor <iant@google.com> wrote:
> Matt Rice <ratmice@gmail.com> writes:
>
>> ok, so here is the list of questions I have regarding -P/-p i couldn't
>> glean from suns documentation
>
> The best way to answer all of these questions is to see what Solaris ld
> actually does.
>

Got this done, attached is a patch which implements my findings, and
documents the behaviour.
Solaris ld does not attempt to load the library or use the soname in it.
let me know if this is something I should do for the sake of
consistency with other ld behaviour,
or if documenting it is enough.

my copyright assignment should be arriving any day now.

2009-09-12  Matt Rice <ratmice@gmail.com>

	* bfd-in.h (bfd_elf_size_dynamic_sections): Add audit and depaudit
	arguments.
	* elflink.c (bfd_elf_size_dynamic_sections): Generate DT_AUDIT,
	DT_DEPAUDIT from audit/depaudit arguments.
	(elf_finalize_dynstr): finalize DT_AUDIT and DT_DEPAUDIT strtab entries.
	* bfd-in2.h: Regenerate.

2009-09-12  Matt Rice <ratmice@gmail.com>

	* emultempl/elf32.em:
	(gld${EMULATION_NAME}_add_options): Add -p and -P options.
	(gld${EULATION_NAME}_handle_options): Ditto.
	(gld${EULATION_NAME}_list_options): Ditto.
	(gld${EMULATION_NAME}_append_to_separated_string): New function for
	handling rpath-like colon separated strings.
	(gld${EMULATION_NAME}_before_allocation): Pass the audit and depaudit
	libs to bfd.
	ld.texinfo: Document -p and -P options.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.diff
Type: application/octet-stream
Size: 8692 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090912/65bdbddf/attachment.obj>


More information about the Binutils mailing list