This change modifies how ObjectFileELF determines the architecture of an ELF file. It no longer assumes the elf file's vendor and OS is the same as the current host. It is one step in supporting running lldb across MacOSX/Linux/FreeBSD/NetBSD.
The current ELF note parsing added supports checking for a FreeBSD, Linux, and NetBSD ABI note. If found, the OS is set appropriately. The previously-existing GNU UUID note parsing code has been incorporated into the broader note-parsing code provided here.
n_name is a std::string and the length (namesz) should be handled in the note parser so you should be able to just do note.n_name == LLDB_NT_OWNER_FREEBSD, no?
Also for the purpose of this parsing we'll generally have just one case in each of the switch statements - maybe it'd be more concise to just check note.n_type == LLDB_NT_FREEBSD_ABI_TAG in the if() as well?