forked from OSchip/llvm-project
parent
7071e8b355
commit
571452c11f
|
|
@ -72,14 +72,14 @@ public:
|
||||||
// Returns the size of the section in the output file.
|
// Returns the size of the section in the output file.
|
||||||
uintX_t getSize() const { return Header.sh_size; }
|
uintX_t getSize() const { return Header.sh_size; }
|
||||||
void setSize(uintX_t Val) { Header.sh_size = Val; }
|
void setSize(uintX_t Val) { Header.sh_size = Val; }
|
||||||
uintX_t getFlags() { return Header.sh_flags; }
|
uintX_t getFlags() const { return Header.sh_flags; }
|
||||||
uintX_t getFileOff() { return Header.sh_offset; }
|
uintX_t getFileOff() const { return Header.sh_offset; }
|
||||||
uintX_t getAlign() {
|
uintX_t getAlign() const {
|
||||||
// The ELF spec states that a value of 0 means the section has no alignment
|
// The ELF spec states that a value of 0 means the section has no alignment
|
||||||
// constraits.
|
// constraits.
|
||||||
return std::max<uintX_t>(Header.sh_addralign, 1);
|
return std::max<uintX_t>(Header.sh_addralign, 1);
|
||||||
}
|
}
|
||||||
uint32_t getType() { return Header.sh_type; }
|
uint32_t getType() const { return Header.sh_type; }
|
||||||
void updateAlign(uintX_t Align) {
|
void updateAlign(uintX_t Align) {
|
||||||
if (Align > Header.sh_addralign)
|
if (Align > Header.sh_addralign)
|
||||||
Header.sh_addralign = Align;
|
Header.sh_addralign = Align;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue