From: Roland McGrath Date: Mon, 26 Nov 2012 17:49:11 +0000 (+0000) Subject: bfd/ X-Git-Tag: cgen-snapshot-20121201~54 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa6407c6ed97409084568c3336ee334d2f1eb540;p=external%2Fbinutils.git bfd/ * elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ff60564..5d033a6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2012-11-26 Roland McGrath + + * elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null. + 2012-11-21 H.J. Lu PR binutils/14493 diff --git a/bfd/elf-nacl.c b/bfd/elf-nacl.c index 04659e7..ce401fa 100644 --- a/bfd/elf-nacl.c +++ b/bfd/elf-nacl.c @@ -75,7 +75,7 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info) struct elf_segment_map **first_load = NULL; struct elf_segment_map **last_load = NULL; bfd_boolean moved_headers = FALSE; - int sizeof_headers = bfd_sizeof_headers (abfd, info); + int sizeof_headers = info == NULL ? 0 : bfd_sizeof_headers (abfd, info); bfd_vma maxpagesize = get_elf_backend_data (abfd)->maxpagesize; if (info != NULL && info->user_phdrs) @@ -149,8 +149,7 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info) proper order for the ELF rule that they must appear in ascending address order. So find the two segments we swapped before, and swap them back. */ bfd_boolean -nacl_modify_program_headers (bfd *abfd, - struct bfd_link_info *info ATTRIBUTE_UNUSED) +nacl_modify_program_headers (bfd *abfd, struct bfd_link_info *info) { struct elf_segment_map **m = &elf_tdata (abfd)->segment_map; Elf_Internal_Phdr *phdr = elf_tdata (abfd)->phdr;