6653 dtrace modifies ELF string table causing problems for linker

Review Request #853 — Created Feb. 10, 2018 and submitted

citrus
illumos-gate
master
ac9c5be...
general
6653 dtrace modifies ELF string table causing problems for linker

cherry-picking this dtrace fix from joyent where it has been for a year now; see:

https://smartos.org/bugview/OS-5946

This has also been in OmniOS for a month and allowed us to upgrade past binutils 2.25.1

There's more information in the issue https://illumos.org/issues/6653

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
yuripv
  1. So the problem is like "writing to constant strings"?

    1. Yes, and became (more of?) a problem with later binutils as they introduced string suffix merging for ELF .strtab.
      (see https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=ef10c3ace00674e8c3599c3bf95f06c87d68898b for their commit)

      With this change, an entry in .strtab like "resource__free" would also be used for "free" however dtrace was replacing the "__" with "-" so that the second string now pointed to "ree"

  2. 
      
richlowe
  1. Ship It!
  2. 
      
yuripv
  1. Ship It!
  2. 
      
andy_js
  1. 
      
  2. usr/src/lib/libdtrace/common/dt_link.c (Diff revision 1)
     
     
    I think something like "probe name too long" might be more helpful here.
  3. 
      
citrus
andy_js
  1. Ship It!
  2. 
      
yuripv
  1. Ship It!
  2. 
      
hadfl
  1. Ship It!
  2. 
      
citrus
Review request changed

Status: Closed (submitted)

Loading...