diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
commit | e252b51ccde010cbd2a146485d8045103cd99533 (patch) | |
tree | e060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/ada/libgnat/s-objrea.adb | |
parent | f10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff) | |
parent | 104c05c5284b7822d770ee51a7d91946c7e56d50 (diff) | |
download | gcc-e252b51ccde010cbd2a146485d8045103cd99533.zip gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2 |
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/ada/libgnat/s-objrea.adb')
-rw-r--r-- | gcc/ada/libgnat/s-objrea.adb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ada/libgnat/s-objrea.adb b/gcc/ada/libgnat/s-objrea.adb index 0cfa522..9dd8c1f 100644 --- a/gcc/ada/libgnat/s-objrea.adb +++ b/gcc/ada/libgnat/s-objrea.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2009-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2009-2021, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -47,7 +47,7 @@ package body System.Object_Reader is function Trim_Trailing_Nuls (Str : String) return String; -- Return a copy of a string with any trailing NUL characters truncated - procedure Check_Read_Offset (S : in out Mapped_Stream; Size : uint32); + procedure Check_Read_Offset (S : Mapped_Stream; Size : uint32); -- Check that the SIZE bytes at the current offset are still in the stream ------------------------------------- @@ -78,6 +78,7 @@ package body System.Object_Reader is EM_SPARCV9 : constant := 43; -- SPARC v9 64-bit EM_IA_64 : constant := 50; -- Intel Merced EM_X86_64 : constant := 62; -- AMD x86-64 architecture + EM_AARCH64 : constant := 183; -- Aarch64 EN_NIDENT : constant := 16; @@ -648,6 +649,9 @@ package body System.Object_Reader is when EM_ARM => Res.Arch := ARM; + when EM_AARCH64 => + Res.Arch := AARCH64; + when others => raise Format_Error with "unrecognized architecture"; end case; @@ -1931,7 +1935,7 @@ package body System.Object_Reader is return To_String_Ptr_Len (Read (S)); end Read; - procedure Check_Read_Offset (S : in out Mapped_Stream; Size : uint32) is + procedure Check_Read_Offset (S : Mapped_Stream; Size : uint32) is begin if S.Off + Offset (Size) > Offset (Last (S.Region)) then raise IO_Error with "could not read from object file"; @@ -2038,7 +2042,8 @@ package body System.Object_Reader is Address_32 := Read (S); return uint64 (Address_32); - when IA64 + when AARCH64 + | IA64 | PPC64 | SPARC64 | x86_64 |