(bfd *, asection *);
extern bool _bfd_elf_map_sections_to_segments
- (bfd *, struct bfd_link_info *);
+ (bfd *, struct bfd_link_info *, bool *);
extern bool _bfd_elf_is_function_type (unsigned int);
#define IS_TBSS(s) \
((s->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) == SEC_THREAD_LOCAL)
-/* Set up a mapping from BFD sections to program segments. */
+/* Set up a mapping from BFD sections to program segments. Update
+ NEED_LAYOUT if the section layout is changed. */
bool
-_bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
+_bfd_elf_map_sections_to_segments (bfd *abfd,
+ struct bfd_link_info *info,
+ bool *need_layout ATTRIBUTE_UNUSED)
{
unsigned int count;
struct elf_segment_map *m;
unsigned int opb = bfd_octets_per_byte (abfd, NULL);
if (link_info == NULL
- && !_bfd_elf_map_sections_to_segments (abfd, link_info))
+ && !_bfd_elf_map_sections_to_segments (abfd, link_info, NULL))
return false;
alloc = 0;
{
/* Regenerate program headers. */
elf_seg_map (info->output_bfd) = NULL;
- return _bfd_elf_map_sections_to_segments (info->output_bfd, info);
+ return _bfd_elf_map_sections_to_segments (info->output_bfd, info,
+ NULL);
}
return true;
if (lang_phdr_list == NULL)
elf_seg_map (link_info.output_bfd) = NULL;
if (!_bfd_elf_map_sections_to_segments (link_info.output_bfd,
- &link_info))
+ &link_info,
+ &need_layout))
einfo (_("%F%P: map sections to segments failed: %E\n"));
if (phdr_size != elf_program_header_size (link_info.output_bfd))