~ubuntu-branches/ubuntu/wily/clamav/wily-proposed

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/Target/TargetAsmBackend.h

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Sebastian Andrzej Siewior, Andreas Cadhalpun, Scott Kitterman, Javier Fernández-Sanguino
  • Date: 2015-01-28 00:25:13 UTC
  • mfrom: (0.48.14 sid)
  • Revision ID: package-import@ubuntu.com-20150128002513-lil2oi74cooy4lzr
Tags: 0.98.6+dfsg-1
[ Sebastian Andrzej Siewior ]
* update "fix-ssize_t-size_t-off_t-printf-modifier", include of misc.h was
  missing but was pulled in via the systemd patch.
* Don't leak return codes from libmspack to clamav API. (Closes: #774686).

[ Andreas Cadhalpun ]
* Add patch to avoid emitting incremental progress messages when not
  outputting to a terminal. (Closes: #767350)
* Update lintian-overrides for unused-file-paragraph-in-dep5-copyright.
* clamav-base.postinst: always chown /var/log/clamav and /var/lib/clamav
  to clamav:clamav, not only on fresh installations. (Closes: #775400)
* Adapt the clamav-daemon and clamav-freshclam logrotate scripts,
  so that they correctly work under systemd.
* Move the PidFile variable from the clamd/freshclam configuration files
  to the init scripts. This makes the init scripts more robust against
  misconfiguration and avoids error messages with systemd. (Closes: #767353)
* debian/copyright: drop files from Files-Excluded only present in github
  tarballs
* Drop Workaround-a-bug-in-libc-on-Hurd.patch, because hurd got fixed.
  (see #752237)
* debian/rules: Remove useless --with-system-tommath --without-included-ltdl
  configure options.

[ Scott Kitterman ]
* Stop stripping llvm when repacking the tarball as the system llvm on some
  releases is too old to use
* New upstream bugfix release
  - Library shared object revisions.
  - Includes a patch from Sebastian Andrzej Siewior making ClamAV pid files
    compatible with systemd.
  - Fix a heap out of bounds condition with crafted Yoda's crypter files.
    This issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted mew packer files. This
    issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted upx packer files. This
    issue was discovered by Kevin Szkudlapski of Quarkslab.
  - Fix a heap out of bounds condition with crafted upack packer files. This
    issue was discovered by Sebastian Andrzej Siewior. CVE-2014-9328.
  - Compensate a crash due to incorrect compiler optimization when handling
    crafted petite packer files. This issue was discovered by Sebastian
    Andrzej Siewior.
* Update lintian override for embedded zlib to match new so version

[ Javier Fernández-Sanguino ]
* Updated Spanish Debconf template translation (Closes: #773563)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===-- llvm/Target/TargetAsmBackend.h - Target Asm Backend -----*- C++ -*-===//
 
2
//
 
3
//                     The LLVM Compiler Infrastructure
 
4
//
 
5
// This file is distributed under the University of Illinois Open Source
 
6
// License. See LICENSE.TXT for details.
 
7
//
 
8
//===----------------------------------------------------------------------===//
 
9
 
 
10
#ifndef LLVM_TARGET_TARGETASMBACKEND_H
 
11
#define LLVM_TARGET_TARGETASMBACKEND_H
 
12
 
 
13
#include "llvm/System/DataTypes.h"
 
14
 
 
15
namespace llvm {
 
16
class MCDataFragment;
 
17
class MCFixup;
 
18
class MCInst;
 
19
class MCObjectWriter;
 
20
class MCSection;
 
21
template<typename T>
 
22
class SmallVectorImpl;
 
23
class Target;
 
24
class raw_ostream;
 
25
 
 
26
/// TargetAsmBackend - Generic interface to target specific assembler backends.
 
27
class TargetAsmBackend {
 
28
  TargetAsmBackend(const TargetAsmBackend &);   // DO NOT IMPLEMENT
 
29
  void operator=(const TargetAsmBackend &);  // DO NOT IMPLEMENT
 
30
protected: // Can only create subclasses.
 
31
  TargetAsmBackend(const Target &);
 
32
 
 
33
  /// TheTarget - The Target that this machine was created for.
 
34
  const Target &TheTarget;
 
35
 
 
36
  unsigned HasAbsolutizedSet : 1;
 
37
  unsigned HasReliableSymbolDifference : 1;
 
38
  unsigned HasScatteredSymbols : 1;
 
39
 
 
40
public:
 
41
  virtual ~TargetAsmBackend();
 
42
 
 
43
  const Target &getTarget() const { return TheTarget; }
 
44
 
 
45
  /// createObjectWriter - Create a new MCObjectWriter instance for use by the
 
46
  /// assembler backend to emit the final object file.
 
47
  virtual MCObjectWriter *createObjectWriter(raw_ostream &OS) const = 0;
 
48
 
 
49
  /// hasAbsolutizedSet - Check whether this target "absolutizes"
 
50
  /// assignments. That is, given code like:
 
51
  ///   a:
 
52
  ///   ...
 
53
  ///   b:
 
54
  ///   tmp = a - b
 
55
  ///       .long tmp
 
56
  /// will the value of 'tmp' be a relocatable expression, or the assembly time
 
57
  /// value of L0 - L1. This distinction is only relevant for platforms that
 
58
  /// support scattered symbols, since in the absence of scattered symbols (a -
 
59
  /// b) cannot change after assembly.
 
60
  bool hasAbsolutizedSet() const { return HasAbsolutizedSet; }
 
61
 
 
62
  /// hasReliableSymbolDifference - Check whether this target implements
 
63
  /// accurate relocations for differences between symbols. If not, differences
 
64
  /// between symbols will always be relocatable expressions and any references
 
65
  /// to temporary symbols will be assumed to be in the same atom, unless they
 
66
  /// reside in a different section.
 
67
  ///
 
68
  /// This should always be true (since it results in fewer relocations with no
 
69
  /// loss of functionality), but is currently supported as a way to maintain
 
70
  /// exact object compatibility with Darwin 'as' (on non-x86_64). It should
 
71
  /// eventually should be eliminated. See also \see hasAbsolutizedSet.
 
72
  bool hasReliableSymbolDifference() const {
 
73
    return HasReliableSymbolDifference;
 
74
  }
 
75
 
 
76
  /// hasScatteredSymbols - Check whether this target supports scattered
 
77
  /// symbols. If so, the assembler should assume that atoms can be scattered by
 
78
  /// the linker. In particular, this means that the offsets between symbols
 
79
  /// which are in distinct atoms is not known at link time, and the assembler
 
80
  /// must generate fixups and relocations appropriately.
 
81
  ///
 
82
  /// Note that the assembler currently does not reason about atoms, instead it
 
83
  /// assumes all temporary symbols reside in the "current atom".
 
84
  bool hasScatteredSymbols() const { return HasScatteredSymbols; }
 
85
 
 
86
  /// doesSectionRequireSymbols - Check whether the given section requires that
 
87
  /// all symbols (even temporaries) have symbol table entries.
 
88
  virtual bool doesSectionRequireSymbols(const MCSection &Section) const {
 
89
    return false;
 
90
  }
 
91
 
 
92
  /// isSectionAtomizable - Check whether the given section can be split into
 
93
  /// atoms.
 
94
  ///
 
95
  /// \see MCAssembler::isSymbolLinkerVisible().
 
96
  virtual bool isSectionAtomizable(const MCSection &Section) const {
 
97
    return true;
 
98
  }
 
99
 
 
100
  /// isVirtualSection - Check whether the given section is "virtual", that is
 
101
  /// has no actual object file contents.
 
102
  virtual bool isVirtualSection(const MCSection &Section) const = 0;
 
103
 
 
104
  /// ApplyFixup - Apply the \arg Value for given \arg Fixup into the provided
 
105
  /// data fragment, at the offset specified by the fixup and following the
 
106
  /// fixup kind as appropriate.
 
107
  virtual void ApplyFixup(const MCFixup &Fixup, MCDataFragment &Fragment,
 
108
                          uint64_t Value) const = 0;
 
109
 
 
110
  /// MayNeedRelaxation - Check whether the given instruction may need
 
111
  /// relaxation.
 
112
  ///
 
113
  /// \param Inst - The instruction to test.
 
114
  virtual bool MayNeedRelaxation(const MCInst &Inst) const = 0;
 
115
 
 
116
  /// RelaxInstruction - Relax the instruction in the given fragment to the next
 
117
  /// wider instruction.
 
118
  ///
 
119
  /// \param Inst - The instruction to relax, which may be the same as the
 
120
  /// output.
 
121
  /// \parm Res [output] - On return, the relaxed instruction.
 
122
  virtual void RelaxInstruction(const MCInst &Inst, MCInst &Res) const = 0;
 
123
 
 
124
  /// WriteNopData - Write an (optimal) nop sequence of Count bytes to the given
 
125
  /// output. If the target cannot generate such a sequence, it should return an
 
126
  /// error.
 
127
  ///
 
128
  /// \return - True on success.
 
129
  virtual bool WriteNopData(uint64_t Count, MCObjectWriter *OW) const = 0;
 
130
};
 
131
 
 
132
} // End llvm namespace
 
133
 
 
134
#endif