forked from OSchip/llvm-project
parent
87fdafc7b2
commit
dcd61c2d14
|
@ -326,16 +326,6 @@ protected:
|
||||||
const ELFLinkingContext &_context;
|
const ELFLinkingContext &_context;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Handle linker scripts. TargetLayouts would derive
|
|
||||||
/// from this class to override some of the functionalities.
|
|
||||||
template<class ELFT>
|
|
||||||
class ScriptLayout: public DefaultLayout<ELFT> {
|
|
||||||
public:
|
|
||||||
ScriptLayout(const ELFLinkingContext &context)
|
|
||||||
: DefaultLayout<ELFT>(context)
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
|
|
||||||
template <class ELFT>
|
template <class ELFT>
|
||||||
Layout::SectionOrder DefaultLayout<ELFT>::getSectionOrder(
|
Layout::SectionOrder DefaultLayout<ELFT>::getSectionOrder(
|
||||||
StringRef name, int32_t contentType, int32_t contentPermissions) {
|
StringRef name, int32_t contentType, int32_t contentPermissions) {
|
||||||
|
|
|
@ -30,7 +30,6 @@ namespace lld {
|
||||||
namespace elf {
|
namespace elf {
|
||||||
|
|
||||||
template <typename ELFT> class DefaultLayout;
|
template <typename ELFT> class DefaultLayout;
|
||||||
template <typename ELFT> class ScriptLayout;
|
|
||||||
|
|
||||||
/// \brief A segment can be divided into segment slices
|
/// \brief A segment can be divided into segment slices
|
||||||
/// depending on how the segments can be split
|
/// depending on how the segments can be split
|
||||||
|
|
|
@ -16,6 +16,4 @@ lib/ReaderWriter/ELF
|
||||||
|
|
||||||
- Gnu linkonce sections.
|
- Gnu linkonce sections.
|
||||||
|
|
||||||
- ScriptLayout
|
|
||||||
|
|
||||||
- Fix section flags as they appear in input (update content permissions)
|
- Fix section flags as they appear in input (update content permissions)
|
||||||
|
|
|
@ -18,10 +18,10 @@ namespace elf {
|
||||||
/// \brief The target can override certain functions in the DefaultLayout
|
/// \brief The target can override certain functions in the DefaultLayout
|
||||||
/// class so that the order, the name of the section and the segment type could
|
/// class so that the order, the name of the section and the segment type could
|
||||||
/// be changed in the final layout
|
/// be changed in the final layout
|
||||||
template <class ELFT> class TargetLayout : public ScriptLayout<ELFT> {
|
template <class ELFT> class TargetLayout : public DefaultLayout<ELFT> {
|
||||||
public:
|
public:
|
||||||
TargetLayout(const ELFLinkingContext &context)
|
TargetLayout(const ELFLinkingContext &context)
|
||||||
: ScriptLayout<ELFT>(context) {}
|
: DefaultLayout<ELFT>(context) {}
|
||||||
};
|
};
|
||||||
} // end namespace elf
|
} // end namespace elf
|
||||||
} // end namespace lld
|
} // end namespace lld
|
||||||
|
|
Loading…
Reference in New Issue