Class: PEdump::IMAGE_SECTION_HEADER
Instance Method Summary collapse
Instance Method Details
#flags_desc ⇒ Object
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/pedump.rb', line 219 def flags_desc r = '' f = self.flags.to_i r << (f & 0x4000_0000 > 0 ? 'R' : '-') r << (f & 0x8000_0000 > 0 ? 'W' : '-') r << (f & 0x2000_0000 > 0 ? 'X' : '-') r << ' CODE' if f & 0x20 > 0 # section contains initialized data. Almost all sections except executable and the .bss section have this flag set r << ' IDATA' if f & 0x40 > 0 # section contains uninitialized data (for example, the .bss section) r << ' UDATA' if f & 0x80 > 0 r << ' DISCARDABLE' if f & 0x02000000 > 0 r << ' SHARED' if f & 0x10000000 > 0 r end |
#pack ⇒ Object
238 239 240 |
# File 'lib/pedump.rb', line 238 def pack to_a.pack FORMAT.tr('A','a') # pad names with NULL bytes on pack() end |