This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld maps sections without consider memory region?


Hi Masaki,

(Still I don't agree why PHDR is needed)

I have expected result on the test case I sent and some variations.
But the another ldscript used for my product generates
huge (over 3GB) elf executable with no warnings...
It was 500KB without PHDRS. There seems to have the another issue.

Please could you give the attached patch a try ? I think that it will solve the problem without requiring that you specify the program headers in your linker file.


Cheers
  Nick

PS. I am still running tests of my own on this patch, so if it throws up any problems I will let you know.

include/ChangeLog
2007-02-16  Nick Clifton  <nickc@redhat.com>

	* bfdlink.h (struct bfd_link_callbacks): Add
	override_segment_assignment field.

bfd/ChangeLog
2007-02-16  Nick Clifton  <nickc@redhat.com>

	* elf.c (_bfd_elf_map_sections_to_segments): If the
	override_segment_assignment callback is defined then call it.

ld/ChangeLog
2007-02-16  Nick Clifton  <nickc@redhat.com>

	* ldlang.c (ldlang_override_segment_assignment): New function.
	* ldlang.h (ldlang_override_segment_assignment): Prototype.
	* ldmain.c (link_callbacks): Add
	ldlang_override_segment_assignment.

Attachment: MEMORY_and_segments.patch.bz2
Description: BZip2 compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]