From 2889e75bfb63b5638dffb3bf9ae598e85af86af9 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 21 Feb 2007 16:43:50 +0000 Subject: Take into account MEMORY regions when creating a segment map. --- bfd/ChangeLog | 5 +++++ bfd/elf.c | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'bfd') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f1d2ed7..0bd6795 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2007-02-21 Nick Clifton + + * elf.c (_bfd_elf_map_sections_to_segments): If the + override_segment_assignment callback is defined then call it. + 2007-02-21 Alan Modra * elf32-spu.c (spu_elf_size_stubs): Correct order of warning args. diff --git a/bfd/elf.c b/bfd/elf.c index 460502c..95f3401 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -3953,6 +3953,10 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) new_segment = FALSE; } + /* Allow interested parties a chance to override our decision. */ + if (last_hdr && info->callbacks->override_segment_assignment) + new_segment = info->callbacks->override_segment_assignment (info, abfd, hdr, last_hdr, new_segment); + if (! new_segment) { if ((hdr->flags & SEC_READONLY) == 0) -- cgit v1.1