{"push_id":798922732,"size":4,"distinct_size":4,"ref":"refs/heads/master","head":"8c60ef43a8c45f3f8f6ab275ba331640f658f59b","before":"25f004c8dd2d96f92ea8f18217a04212f907eb94","commits":[{"sha":"9b8b325a1f4cdaf235e7d803849dde6ededec865","author":{"email":"1c24ea00d8ce704dffa3997c81be1310fc2bbac6@libc.org","name":"Rich Felker"},"message":"Add --no-dynamic-linker option to ld, for static PIE use\n\nInhibits output of .interp section in ELF executables.\n\ninclude/\n\t* bfdlink.h (struct bfd_link_info): Add \"nointerp\" field.\nbfd/\n\t* elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create\n\t.interp when info->nointerp.\n\t(bfd_elf_size_dynamic_sections): Adjust assert.\n\t* elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp\n\twhen info->nointerp.\n\t* elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.\n\t* elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.\n\t* elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.\n\t* elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.\n\t* elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.\n\t* elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.\n\t* elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.\n\t* elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.\n\t* elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.\n\t* elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.\n\t* elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.\n\t* elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.\n\t* elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.\n\t* elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.\n\t* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.\n\t* elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.\n\t* elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.\n\t* elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.\n\t* elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.\n\t* elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.\n\t* elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.\n\t* elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.\n\t* elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.\n\t* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.\n\t* elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.\n\t* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.\n\t* elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.\n\t* elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.\n\t* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.\n\t* elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.\n\t* elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.\n\t* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.\n\t* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.\n\t* elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.\nld/\n\t* ld.texinfo (--no-dynamic-linker): Document.\n\t* ldlex.h (enum option_values): Add OPTION_NO_DYNAMIC_LINKER.\n\t* lexsup.c (ld_options, parse_args): Handle --no-dynamic-linker.","distinct":true,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/9b8b325a1f4cdaf235e7d803849dde6ededec865"},{"sha":"7d1c9c9b4c586ede0abecb7a0a47d8996aaf56da","author":{"email":"c7e71725c97f9c37b4edbe71d193d6b3659aa171@adacore.com","name":"Joel Brobecker"},"message":"crash printing non-local variable from nested subprogram\n\nWe have noticed that GDB would sometimes crash trying to print\nfrom a nested function the value of a variable declared in an\nenclosing scope. This appears to be target dependent, although\nthat correlation might only be fortuitious.  We noticed the issue\non x86_64-darwin, x86-vxworks6 and x86-solaris.  The investigation\nwas done on Darwin.\n\nThis is a new feature that was introduced by:\n\n    commit 63e43d3aedb8b1112899c2d0ad74cbbee687e5d6\n    Date:   Thu Feb 5 17:00:06 2015 +0100\n    DWARF: handle non-local references in nested functions\n\nWe can reproduce the problem with one of the testcases that was\nadded with the patch (gdb.base/nested-subp1.exp), where we have...\n\n    18 int\n    19 foo (int i1)\n    20 {\n    21   int\n    22   nested (int i2)\n    23   {\n    [...]\n    27     return i1 * i2; /* STOP */\n    28   }\n\n...  After building the example program, and running until line 27,\ntry printing the value of \"i1\":\n\n    % gdb gdb.base/nested-subp1\n    (gdb) break foo.c:27\n    (gdb) run\n    Breakpoint 1, nested (i2=2) at /[...]/nested-subp1.c:27\n    27          return i1 * i2; /* STOP */\n    (gdb) p i1\n    [1]    73090 segmentation fault  ../gdb -q gdb.base/nested-subp1\n\nOoops!\n\nWhat happens is that, because the reference is non-local, we are trying\nto follow the function's static link, which does...\n\n    /* If we don't know how to compute FRAME's base address, don't give up:\n       maybe the frame we are looking for is upper in the stace frame.  */\n    if (framefunc != NULL\n        && SYMBOL_BLOCK_OPS (framefunc)->get_frame_base != NULL\n        && (SYMBOL_BLOCK_OPS (framefunc)->get_frame_base (framefunc, frame)\n            == upper_frame_base))\n\n... or, in other words, calls the get_frame_base \"method\" of\nframefunc's struct symbol_block_ops data. This resolves to\nthe block_op_get_frame_base function.\n\nLooking at the function's implementation, we see:\n\n  struct dwarf2_locexpr_baton *dlbaton;\n  [...]\n  dlbaton = SYMBOL_LOCATION_BATON (framefunc);\n  [...]\n  result = dwarf2_evaluate_loc_desc (type, frame, start, length,\n                                     dlbaton->per_cu);\n                                     ^^^^^^^^^^^^^^^\n\nPrinting dlbaton->per_cu gives a value that seems fairly bogus for\na memory address (0x60). Because of it, dwarf2_evaluate_loc_desc\nthen crashes trying to dereference it.\n\nWhat's different on Darwin compared to Linux is that the function's\nframe base is encoded using the following form:\n\n        .byte   0x40    # uleb128 0x40; (DW_AT_frame_base)\n        .byte   0x6     # uleb128 0x6; (DW_FORM_data4)\n\n... and so dwarf2_symbol_mark_computed ends up creating\na SYMBOL_LOCATION_BATON as a struct dwarf2_loclist_baton:\n\n  if (attr_form_is_section_offset (attr)\n      /* .debug_loc{,.dwo} may not exist at all, or the offset may be outside\n         the section.  If so, fall through to the complaint in the\n         other branch.  */\n      && DW_UNSND (attr) < dwarf2_section_size (objfile, section))\n    {\n      struct dwarf2_loclist_baton *baton;\n      [...]\n      SYMBOL_LOCATION_BATON (sym) = baton;\n\nHowever, if you look more closely at block_op_get_frame_base's\nimplementation, you'll notice that the function extracts the\nsymbol's SYMBOL_LOCATION_BATON as a dwarf2_locexpr_baton\n(a DWARF _expression_ rather than a _location list_).\nThat's why we end up decoding the DLBATON improperly, and thus\npass a random dlbaton->per_cu when calling dwarf2_evaluate_loc_desc.\n\nThis works on x86_64-linux, because we indeed have the frame base\ndescribed using a different form:\n\n        .uleb128 0x40   # (DW_AT_frame_base)\n        .uleb128 0x18   # (DW_FORM_exprloc)\n\nThis patch fixes the issue by doing what we do for most (if not all)\nother such methods: providing one implementation each for loc-list,\nand loc-expr. Both implementations are nearly identical, so perhaps\nwe might later want to improve this. But this patch first tries to\nfix the crash first, leaving the design issue for later.\n\ngdb/ChangeLog:\n\n        * dwarf2loc.c (locexpr_get_frame_base): Renames\n        block_op_get_frame_base.\n        (dwarf2_block_frame_base_locexpr_funcs): Replace reference to\n        block_op_get_frame_base by reference to locexpr_get_frame_base.\n        (loclist_get_frame_base): New function, near identical copy of\n        locexpr_get_frame_base.\n        (dwarf2_block_frame_base_loclist_funcs): Replace reference to\n        block_op_get_frame_base by reference to loclist_get_frame_base.\n\nTested on x86_64-darwin (AdaCore testsuite), and x86_64-linux\n(official testsuite).","distinct":true,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/7d1c9c9b4c586ede0abecb7a0a47d8996aaf56da"},{"sha":"2ee7123e5a54fba15b976a05bce173871eba8aba","author":{"email":"7682e325dfbe607fe8f2bd25716e01834baa91b9@gmail.com","name":"Doug Evans"},"message":"dwarf2_compute_name: add fixme, don't use same name as parameter for local\n\ngdb/ChangeLog:\n\n\t* dwarf2read.c (dwarf2_compute_name): Add FIXME.  Don't use a local\n\tvariable name that collides with a parameter.","distinct":true,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/2ee7123e5a54fba15b976a05bce173871eba8aba"},{"sha":"8c60ef43a8c45f3f8f6ab275ba331640f658f59b","author":{"email":"46ff6e41b02a6ff6bd50cc64faab96b75208d63d@sourceware.org","name":"GDB Administrator"},"message":"Automatic date update in version.in","distinct":true,"url":"https://api.github.com/repos/bminor/binutils-gdb/commits/8c60ef43a8c45f3f8f6ab275ba331640f658f59b"}]}