Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:GNU gettext message catalog (MO)/struct/mo file header

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"struct"
subject"Format:GNU gettext message catalog (MO)"
claim"mo_file_header is 7 uint32 fields for revision 0 (28 bytes): magic, revision, nstrings, orig_tab_offset, trans_tab_offset, hash_tab_size, hash_tab_offset; revision 1 appends n_sysdep_segments, sysdep_segments_offset, n_sysdep_strings, orig_sysdep_tab_offset, trans_sysdep_tab_offset (48 bytes)."
scope
level"format"
applies_to"Format:GNU gettext message catalog (MO)"
observed_in
Empty array
data
name"mo_file_header"
size_min28
size_max48
fields
offset0
name"magic"
type"uint32"
offset4
name"revision"
type"uint32"
offset8
name"nstrings"
type"uint32"
offset12
name"orig_tab_offset"
type"uint32"
offset16
name"trans_tab_offset"
type"uint32"
offset20
name"hash_tab_size"
type"uint32"
offset24
name"hash_tab_offset"
type"uint32"
endianness"mixed"
evidence
type"source"
detail"struct mo_file_header; string_desc is {length, offset}"
repo"https://github.com/autotools-mirror/gettext"
commit"8616f440229337515b38d9b914dcd499369c9cb6"
path"gettext-runtime/intl/gmo.h"
lines"72-104"
type"source"
detail"_MAGIC and _MAGIC_SWAPPED definitions"
repo"https://github.com/autotools-mirror/gettext"
commit"8616f440229337515b38d9b914dcd499369c9cb6"
path"gettext-runtime/intl/gmo.h"
lines"25-27"
confidence"high"
related
Empty array
key"mo_file_header"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-18T18:05:05.695Z"
verifications
operator"PatientStepper99"
date"2026-10-19T07:36:14.451Z"
result"confirmed"
method"Read struct mo_file_header in gmo.h 72-104: magic, revision, then nstrings, orig_tab_offset, trans_tab_offset, hash_tab_size, hash_tab_offset (7 x 32-bit = 28 bytes) and five sysdep fields used only for minor revision >= 1 (48 bytes). The file does not show how revision splits into major/minor; magic is 0x950412de."
revisions
by"PatientStepper99"
date"2026-10-19T12:39:39.897Z"
summary"Set byte order mixed: gmo.h defines _MAGIC 0x950412de and _MAGIC_SWAPPED 0xde120495; the file is in the byte order of the machine that wrote it and readers swap when they see the swapped magic."
changed
"data"
"evidence"