[BACK]Return to interception_linux.cc CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / gpl3 / gcc / dist / libsanitizer / interception

File: [cvs.NetBSD.org] / src / external / gpl3 / gcc / dist / libsanitizer / interception / Attic / interception_linux.cc (download)

Revision 1.1.1.2 (vendor branch), Sun Jan 24 06:05:41 2016 UTC (8 years, 2 months ago) by mrg
Branch: FSF
CVS Tags: gcc-7-4-0, gcc-6-5-0, gcc-6-4-0, gcc-5-5-0, gcc-5-4-0, gcc-5-3-0
Changes since 1.1.1.1: +10 -4 lines

import GCC 5.3.0.  see these urls for details which are too large to
include here:

	http://gcc.gnu.org/gcc-4.9/changes.html
	http://gcc.gnu.org/gcc-5/changes.html

(note that GCC 5.x is a release stream like GCC 4.9.x, 4.8.x, etc.)


the main issues we will have are:

The default mode for C is now -std=gnu11 instead of -std=gnu89.

ARM:
The deprecated option -mwords-little-endian has been removed.
The options -mapcs, -mapcs-frame, -mtpcs-frame and -mtpcs-leaf-frame
 which are only applicable to the old ABI have been deprecated.

MIPS:
The o32 ABI has been modified and extended. The o32 64-bit
 floating-point register support is now obsolete and has been removed.
 It has been replaced by three ABI extensions FPXX, FP64A, and FP64.
 The meaning of the -mfp64 command-line option has changed. It is now
 used to enable the FP64A and FP64 ABI extensions.

//===-- interception_linux.cc -----------------------------------*- C++ -*-===//
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is a part of AddressSanitizer, an address sanity checker.
//
// Linux-specific interception methods.
//===----------------------------------------------------------------------===//

#if defined(__linux__) || defined(__FreeBSD__)
#include "interception.h"

#include <dlfcn.h>   // for dlsym() and dlvsym()

namespace __interception {
bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
    uptr real, uptr wrapper) {
  *func_addr = (uptr)dlsym(RTLD_NEXT, func_name);
  return real == wrapper;
}

#if !defined(__ANDROID__)  // android does not have dlvsym
void *GetFuncAddrVer(const char *func_name, const char *ver) {
  return dlvsym(RTLD_NEXT, func_name, ver);
}
#endif  // !defined(__ANDROID__)

}  // namespace __interception


#endif  // __linux__ || __FreeBSD__