diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
commit | 2ff14448863ac1a1dd9533461708e29aae170c2d (patch) | |
tree | 85b9fea2bbfe3f06473cfa381eed11f273b57c5c /vendor/gimli/src/write | |
parent | Adding debian version 1.64.0+dfsg1-1. (diff) | |
download | rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.tar.xz rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.zip |
Adding debian version 1.65.0+dfsg1-2.debian/1.65.0+dfsg1-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | vendor/gimli/src/write/cfi.rs | 15 | ||||
-rw-r--r-- | vendor/gimli/src/write/op.rs | 6 |
2 files changed, 19 insertions, 2 deletions
diff --git a/vendor/gimli/src/write/cfi.rs b/vendor/gimli/src/write/cfi.rs index c58eb1b1d..718cb69ad 100644 --- a/vendor/gimli/src/write/cfi.rs +++ b/vendor/gimli/src/write/cfi.rs @@ -239,7 +239,7 @@ impl CommonInformationEntry { } if let Some((eh_pe, address)) = self.personality { w.write_u8(eh_pe.0)?; - w.write_eh_pointer(address, constants::DW_EH_PE_absptr, encoding.address_size)?; + w.write_eh_pointer(address, eh_pe, encoding.address_size)?; } if self.fde_address_encoding != constants::DW_EH_PE_absptr { w.write_u8(self.fde_address_encoding.0)?; @@ -888,6 +888,19 @@ mod tests { fde4.lsda = Some(Address::Constant(0x4400)); frames.add_fde(cie2_id, fde4.clone()); + let mut cie3 = CommonInformationEntry::new(encoding, 1, 8, X86_64::RA); + cie3.fde_address_encoding = constants::DW_EH_PE_pcrel; + cie3.lsda_encoding = Some(constants::DW_EH_PE_pcrel); + cie3.personality = Some((constants::DW_EH_PE_pcrel, Address::Constant(0x1235))); + cie3.signal_trampoline = true; + let cie3_id = frames.add_cie(cie3.clone()); + assert_ne!(cie2_id, cie3_id); + assert_eq!(cie3_id, frames.add_cie(cie3.clone())); + + let mut fde5 = FrameDescriptionEntry::new(Address::Constant(0x5000), 0x50); + fde5.lsda = Some(Address::Constant(0x5500)); + frames.add_fde(cie3_id, fde5.clone()); + // Test writing `.debug_frame`. let mut debug_frame = DebugFrame::from(EndianVec::new(LittleEndian)); frames.write_debug_frame(&mut debug_frame).unwrap(); diff --git a/vendor/gimli/src/write/op.rs b/vendor/gimli/src/write/op.rs index d1cacb356..c70eec2dd 100644 --- a/vendor/gimli/src/write/op.rs +++ b/vendor/gimli/src/write/op.rs @@ -778,7 +778,11 @@ impl Operation { } else { w.write_u8(constants::DW_OP_GNU_implicit_pointer.0)?; } - let size = encoding.format.word_size(); + let size = if encoding.version == 2 { + encoding.address_size + } else { + encoding.format.word_size() + }; match entry { Reference::Symbol(symbol) => { w.write_reference(symbol, size)?; |