Permalink
Browse files

i#1923, DRi#2127, DRi#1374: eliminate UNIX symlink library versioning

Eliminates libdynamorio.so versioning on UNIX platforms to avoid numerous
problems (DRi#2127: hardcoded DT_NEEDED, DRi#1374: similar issues on Mac,
Android symlink limitations).  These versions were not providing much
benefit, as we weren't using the system loader.  DR's loader and the DRMF
init code provide their own client version compatibility checks.

Updates DR to 549ce61 for the same sorts of changes in the DR code as well
as a fix for DRi#2128.
Updates test asm line numbers for asm define changes.

Review-URL: https://codereview.appspot.com/311500043
  • Loading branch information...
derekbruening committed Jan 9, 2017
1 parent 2d5e063 commit 2ee98e8a48e8927c737b97a3e1480a20d67c67f8
View
@@ -1,5 +1,5 @@
# **********************************************************
# Copyright (c) 2010-2016 Google, Inc. All rights reserved.
# Copyright (c) 2010-2017 Google, Inc. All rights reserved.
# Copyright (c) 2009-2010 VMware, Inc. All rights reserved.
# **********************************************************
@@ -1219,9 +1219,19 @@ else (USE_DRSYMS)
set(client_target ${toolname})
endif (USE_DRSYMS)
macro(set_library_version target number)
# We only set the version/soversion on Windows to avoid many
# negatives (DRi#1374, DRi#2127, Android "adb push" not supporting
# symlinks, etc.) and very few positives on UNIX platforms. DR's
# loader and the DRMF init code perform their own version checks for
# client compatibility.
if (WINDOWS)
set_target_properties(${target} PROPERTIES VERSION ${number})
endif ()
endmacro()
add_library(${client_target} SHARED ${srcs})
set_target_properties(${client_target} PROPERTIES
VERSION ${TOOL_VERSION_NUMBER})
set_library_version(${client_target} ${TOOL_VERSION_NUMBER})
set_property(TARGET ${client_target} PROPERTY COMPILE_DEFINITIONS
# If we end up wanting this for other DEFINES uses above we'll have to set
# client_target earlier. For now we only need for the C code.
View
@@ -1,5 +1,5 @@
# **********************************************************
# Copyright (c) 2015-2016 Google, Inc. All rights reserved.
# Copyright (c) 2015-2017 Google, Inc. All rights reserved.
# **********************************************************
# Redistribution and use in source and binary forms, with or without
@@ -90,7 +90,7 @@ add_library(drfuzz SHARED ${srcs} ${external_srcs})
# Set a preferred base to avoid conflict if we can
set(PREFERRED_BASE 0x79000000)
configure_DynamoRIO_client(drfuzz)
set_target_properties(drfuzz PROPERTIES VERSION ${DRMF_VERSION_MAJOR_MINOR})
set_library_version(drfuzz ${DRMF_VERSION_MAJOR_MINOR})
configure_drfuzz_target(drfuzz "drwrap" "drmgr")
export_drfuzz_target(drfuzz "drwrap" "drmgr")
install(FILES drfuzz.h drfuzz_mutator.h DESTINATION ${DRMF_INSTALL_INC})
View
@@ -1,5 +1,5 @@
# **********************************************************
# Copyright (c) 2013-2016 Google, Inc. All rights reserved.
# Copyright (c) 2013-2017 Google, Inc. All rights reserved.
# **********************************************************
# Dr. Memory: the memory debugger
@@ -43,7 +43,7 @@ set(DynamoRIO_USE_LIBC ON)
add_library(drstracelib SHARED ${srcs})
# We share the framework version # for now
set_target_properties(drstracelib PROPERTIES VERSION ${DRMF_VERSION_MAJOR_MINOR})
set_library_version(drstracelib ${DRMF_VERSION_MAJOR_MINOR})
if (WIN32)
set_property(TARGET drstracelib PROPERTY COMPILE_DEFINITIONS
@@ -141,7 +141,7 @@ endif ()
add_executable(drstrace ${front_srcs})
configure_DynamoRIO_standalone(drstrace)
target_link_libraries(drstrace drinjectlib drconfiglib drfrontendlib)
set_target_properties(drstrace PROPERTIES VERSION ${DRMF_VERSION})
set_library_version(drstrace ${DRMF_VERSION})
if (WIN32)
get_filename_component(symfetch_name ${symfetch_path} NAME)
set_property(TARGET drstrace PROPERTY COMPILE_DEFINITIONS
@@ -1,5 +1,5 @@
# **********************************************************
# Copyright (c) 2012-2015 Google, Inc. All rights reserved.
# Copyright (c) 2012-2017 Google, Inc. All rights reserved.
# **********************************************************
# Dr. Memory: the memory debugger
@@ -86,7 +86,7 @@ add_library(drsymcache SHARED ${srcs} ${external_srcs})
# Set a preferred base to avoid conflict if we can
set(PREFERRED_BASE 0x77800000)
configure_DynamoRIO_client(drsymcache)
set_target_properties(drsymcache PROPERTIES VERSION ${DRMF_VERSION_MAJOR_MINOR})
set_library_version(drsymcache ${DRMF_VERSION_MAJOR_MINOR})
configure_drsymcache_target(drsymcache "drmgr" "drsyms")
export_drsymcache_target(drsymcache "drmgr" "drsyms")
install(FILES drsymcache.h DESTINATION ${DRMF_INSTALL_INC})
View
@@ -1,5 +1,5 @@
# **********************************************************
# Copyright (c) 2012-2016 Google, Inc. All rights reserved.
# Copyright (c) 2012-2017 Google, Inc. All rights reserved.
# **********************************************************
# Dr. Memory: the memory debugger
@@ -125,7 +125,7 @@ set(PREFERRED_BASE 0x77000000)
configure_DynamoRIO_client(drsyscall)
use_DynamoRIO_extension(drsyscall drmgr)
use_DynamoRIO_extension(drsyscall drcontainers)
set_target_properties(drsyscall PROPERTIES VERSION ${DRMF_VERSION_MAJOR_MINOR})
set_library_version(drsyscall ${DRMF_VERSION_MAJOR_MINOR})
configure_drsyscall_target(drsyscall)
export_drsyscall_target(drsyscall "drmgr")
install(FILES drsyscall.h DESTINATION ${DRMF_INSTALL_INC})
Submodule dynamorio updated 306 files
View
@@ -24,11 +24,11 @@
# while pattern mode reports "writing 1 byte(s)" error.
%if WINDOWS
Error #1: UNADDRESSABLE ACCESS beyond heap bounds:
registers.c_asm.asm:1295
registers.c_asm.asm:1306
Error #2: UNADDRESSABLE ACCESS beyond heap bounds:
registers.c_asm.asm:1307
registers.c_asm.asm:1318
Error #3: UNADDRESSABLE ACCESS beyond heap bounds:
registers.c_asm.asm:1320
registers.c_asm.asm:1331
%endif
%if UNIX
Error #1: UNADDRESSABLE ACCESS beyond heap bounds:
View
@@ -24,29 +24,29 @@ Error #2: UNINITIALIZED READ
bitfield.cpp:54
%if WINDOWS
Error #3: UNINITIALIZED READ: reading register ecx
bitfield.cpp_asm.asm:792
bitfield.cpp_asm.asm:803
Error #4: UNINITIALIZED READ: reading register bl
bitfield.cpp_asm.asm:805
bitfield.cpp_asm.asm:816
Error #5: UNINITIALIZED READ: reading register cl
bitfield.cpp_asm.asm:813
bitfield.cpp_asm.asm:824
Error #6: UNINITIALIZED READ: reading register ecx
bitfield.cpp_asm.asm:818
bitfield.cpp_asm.asm:829
Error #7: UNINITIALIZED READ: reading register ch
bitfield.cpp_asm.asm:827
bitfield.cpp_asm.asm:838
Error #8: UNINITIALIZED READ: reading register cl
bitfield.cpp_asm.asm:830
bitfield.cpp_asm.asm:841
Error #9: UNINITIALIZED READ: reading register ch
bitfield.cpp_asm.asm:835
bitfield.cpp_asm.asm:846
Error #10: UNINITIALIZED READ: reading register ecx
bitfield.cpp_asm.asm:838
bitfield.cpp_asm.asm:849
Error #11: UNINITIALIZED READ: reading register dl
bitfield.cpp_asm.asm:862
bitfield.cpp_asm.asm:873
Error #12: UNINITIALIZED READ: reading register esi
bitfield.cpp_asm.asm:863
bitfield.cpp_asm.asm:874
Error #13: UNINITIALIZED READ: reading 1 byte
bitfield.cpp_asm.asm:877
Error #14: UNINITIALIZED READ: reading 1 byte
bitfield.cpp_asm.asm:888
Error #14: UNINITIALIZED READ: reading 1 byte
bitfield.cpp_asm.asm:899
%endif
%if UNIX
Error #3: UNINITIALIZED READ: reading register ecx
@@ -21,13 +21,13 @@
#
%if WINDOWS
Error #1: UNADDRESSABLE ACCESS beyond heap bounds: reading 1 byte(s)
registers.c_asm.asm:1295
registers.c_asm.asm:1306
Error #2: UNADDRESSABLE ACCESS beyond heap bounds: reading 1 byte(s)
registers.c_asm.asm:1307
registers.c_asm.asm:1318
Error #3: UNADDRESSABLE ACCESS beyond heap bounds: reading 1 byte(s)
registers.c_asm.asm:1320
registers.c_asm.asm:1331
Error #4: UNADDRESSABLE ACCESS beyond heap bounds: reading 1 byte(s)
registers.c_asm.asm:1321
registers.c_asm.asm:1332
%endif
%if UNIX
Error #1: UNADDRESSABLE ACCESS beyond heap bounds: reading 1 byte(s)
@@ -24,9 +24,9 @@
# while pattern mode reports "writing 1 byte(s)" error.
%if WINDOWS
Error #1: UNADDRESSABLE ACCESS beyond heap bounds:
registers.c_asm.asm:1295
registers.c_asm.asm:1306
Error #2: UNADDRESSABLE ACCESS beyond heap bounds:
registers.c_asm.asm:1307
registers.c_asm.asm:1318
%endif
%if UNIX
Error #1: UNADDRESSABLE ACCESS beyond heap bounds:
View
@@ -21,39 +21,39 @@
#
%if WINDOWS
Error #1: UNINITIALIZED READ: reading register eflags
registers.c_asm.asm:1268
registers.c_asm.asm:1279
Error #2: UNINITIALIZED READ: reading register eflags
registers.c_asm.asm:1275
registers.c_asm.asm:1286
Error #3: UNINITIALIZED READ: reading 2 byte(s)
registers.c:104
Error #4: UNINITIALIZED READ: reading register ax
registers.c_asm.asm:1495
registers.c_asm.asm:1506
Error #5: UNINITIALIZED READ: reading register dx
registers.c_asm.asm:1512
registers.c_asm.asm:1523
Error #6: UNINITIALIZED READ: reading register ah
registers.c_asm.asm:1542
registers.c_asm.asm:1553
Error #7: UNINITIALIZED READ: reading 1 byte(s)
registers.c:187
Error #8: UNINITIALIZED READ: reading 1 byte(s)
registers.c_asm.asm:1244
registers.c_asm.asm:1255
Error #9: UNINITIALIZED READ: reading register eflags
registers.c_asm.asm:1069
registers.c_asm.asm:1080
Error #10: UNINITIALIZED READ: reading register eflags
registers.c_asm.asm:1073
registers.c_asm.asm:1084
Error #11: UNINITIALIZED READ: reading register cl
registers.c_asm.asm:1078
registers.c_asm.asm:1089
Error #12: UNINITIALIZED READ: reading register ecx
registers.c_asm.asm:1098
registers.c_asm.asm:1109
Error #13: UNINITIALIZED READ: reading 8 byte(s)
registers.c_asm.asm:1129
registers.c_asm.asm:1140
Error #14: UNADDRESSABLE ACCESS beyond heap bounds: reading 1 byte(s)
registers.c_asm.asm:1295
registers.c_asm.asm:1306
Error #15: UNADDRESSABLE ACCESS beyond heap bounds: reading 1 byte(s)
registers.c_asm.asm:1307
registers.c_asm.asm:1318
Error #16: UNADDRESSABLE ACCESS beyond heap bounds: reading 1 byte(s)
registers.c_asm.asm:1320
registers.c_asm.asm:1331
Error #17: UNADDRESSABLE ACCESS beyond heap bounds: reading 1 byte(s)
registers.c_asm.asm:1321
registers.c_asm.asm:1332
%endif
%if UNIX
Error #1: UNINITIALIZED READ: reading register eflags
@@ -99,21 +99,21 @@ registers.c_asm.asm:967
%endif
%if WINDOWS
Error #19: UNINITIALIZED READ: reading register ecx
registers.c_asm.asm:1637
registers.c_asm.asm:1648
%endif
Error #20: UNINITIALIZED READ: reading register
registers.c:267
Error #21: UNINITIALIZED READ: reading register
registers.c:288
%if WINDOWS
Error #22: UNINITIALIZED READ: reading 1 byte(s)
registers.c_asm.asm:1722
registers.c_asm.asm:1733
Error #23: UNINITIALIZED READ: reading 1 byte(s)
registers.c_asm.asm:1736
registers.c_asm.asm:1747
Error #24: UNINITIALIZED READ: reading 2 byte(s)
registers.c_asm.asm:1750
registers.c_asm.asm:1761
Error #25: UNINITIALIZED READ: reading 2 byte(s)
registers.c_asm.asm:1764
registers.c_asm.asm:1775
%endif
%if UNIX
Error #22: UNINITIALIZED READ: reading 1 byte(s)
View
@@ -1,5 +1,5 @@
# **********************************************************
# Copyright (c) 2014-2015 Google, Inc. All rights reserved.
# Copyright (c) 2014-2017 Google, Inc. All rights reserved.
# **********************************************************
# Dr. Memory: the memory debugger
@@ -90,8 +90,7 @@ set(PREFERRED_BASE 0x78000000)
configure_DynamoRIO_client(umbra)
use_DynamoRIO_extension(umbra drmgr)
use_DynamoRIO_extension(umbra drcontainers)
set_target_properties(umbra PROPERTIES
VERSION ${DRMF_VERSION_MAJOR_MINOR})
set_library_version(umbra ${DRMF_VERSION_MAJOR_MINOR})
configure_umbra_target(umbra)
export_umbra_target(umbra "drmgr")
install(FILES umbra.h DESTINATION ${DRMF_INSTALL_INC})

0 comments on commit 2ee98e8

Please sign in to comment.