You've already forked linux-packaging-mono
Imported Upstream version 5.12.0.220
Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
parent
8bd104cef2
commit
8fc30896db
@ -569,6 +569,9 @@ namespace Mono.Cecil.Cil {
|
||||
if (hash_algo == DocumentHashAlgorithm.SHA1)
|
||||
return hash_sha1;
|
||||
|
||||
if (hash_algo == DocumentHashAlgorithm.SHA256)
|
||||
return hash_sha256;
|
||||
|
||||
return new Guid ();
|
||||
}
|
||||
|
||||
|
@ -1000,7 +1000,7 @@ namespace Mono.Cecil {
|
||||
|
||||
public static bool IsPortablePdb (string fileName)
|
||||
{
|
||||
using (var file = new FileStream (fileName, FileMode.Open, FileAccess.Read, FileShare.Read))
|
||||
using (var file = new FileStream (fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
return IsPortablePdb (file);
|
||||
}
|
||||
|
||||
|
1
external/linker/cecil/Mono.Cecil.PE/Image.cs
vendored
1
external/linker/cecil/Mono.Cecil.PE/Image.cs
vendored
@ -28,6 +28,7 @@ namespace Mono.Cecil.PE {
|
||||
public string RuntimeVersion;
|
||||
public TargetArchitecture Architecture;
|
||||
public ModuleCharacteristics Characteristics;
|
||||
public ushort LinkerVersion;
|
||||
|
||||
public ImageDebugHeader DebugHeader;
|
||||
|
||||
|
@ -81,8 +81,8 @@ namespace Mono.Cecil.PE {
|
||||
// Characteristics 2
|
||||
ushort characteristics = ReadUInt16 ();
|
||||
|
||||
ushort subsystem, dll_characteristics;
|
||||
ReadOptionalHeaders (out subsystem, out dll_characteristics);
|
||||
ushort subsystem, dll_characteristics, linker_version;
|
||||
ReadOptionalHeaders (out subsystem, out dll_characteristics, out linker_version);
|
||||
ReadSections (sections);
|
||||
ReadCLIHeader ();
|
||||
ReadMetadata ();
|
||||
@ -90,6 +90,7 @@ namespace Mono.Cecil.PE {
|
||||
|
||||
image.Kind = GetModuleKind (characteristics, subsystem);
|
||||
image.Characteristics = (ModuleCharacteristics) dll_characteristics;
|
||||
image.LinkerVersion = linker_version;
|
||||
}
|
||||
|
||||
TargetArchitecture ReadArchitecture ()
|
||||
@ -108,7 +109,7 @@ namespace Mono.Cecil.PE {
|
||||
return ModuleKind.Console;
|
||||
}
|
||||
|
||||
void ReadOptionalHeaders (out ushort subsystem, out ushort dll_characteristics)
|
||||
void ReadOptionalHeaders (out ushort subsystem, out ushort dll_characteristics, out ushort linker)
|
||||
{
|
||||
// - PEOptionalHeader
|
||||
// - StandardFieldsHeader
|
||||
@ -118,8 +119,7 @@ namespace Mono.Cecil.PE {
|
||||
|
||||
// pe32 || pe64
|
||||
|
||||
// LMajor 1
|
||||
// LMinor 1
|
||||
linker = ReadUInt16 ();
|
||||
// CodeSize 4
|
||||
// InitializedDataSize 4
|
||||
// UninitializedDataSize4
|
||||
@ -142,7 +142,7 @@ namespace Mono.Cecil.PE {
|
||||
// ImageSize 4
|
||||
// HeaderSize 4
|
||||
// FileChecksum 4
|
||||
Advance (66);
|
||||
Advance (64);
|
||||
|
||||
// SubSystem 2
|
||||
subsystem = ReadUInt16 ();
|
||||
|
@ -218,9 +218,8 @@ namespace Mono.Cecil.PE {
|
||||
|
||||
void WriteOptionalHeaders ()
|
||||
{
|
||||
WriteUInt16 ((ushort) (!pe64 ? 0x10b : 0x20b)); // Magic
|
||||
WriteByte (8); // LMajor
|
||||
WriteByte (0); // LMinor
|
||||
WriteUInt16 ((ushort) (!pe64 ? 0x10b : 0x20b)); // Magic
|
||||
WriteUInt16 (module.linker_version);
|
||||
WriteUInt32 (text.SizeOfRawData); // CodeSize
|
||||
WriteUInt32 ((reloc != null ? reloc.SizeOfRawData : 0)
|
||||
+ (rsrc != null ? rsrc.SizeOfRawData : 0)); // InitializedDataSize
|
||||
|
@ -2414,10 +2414,12 @@ namespace Mono.Cecil {
|
||||
var signature = CreateSignatureWriter ();
|
||||
signature.WriteUInt32 ((uint) async_method.catch_handler.Offset + 1);
|
||||
|
||||
for (int i = 0; i < async_method.yields.Count; i++) {
|
||||
signature.WriteUInt32 ((uint) async_method.yields [i].Offset);
|
||||
signature.WriteUInt32 ((uint) async_method.resumes [i].Offset);
|
||||
signature.WriteCompressedUInt32 (async_method.resume_methods [i].MetadataToken.RID);
|
||||
if (!async_method.yields.IsNullOrEmpty ()) {
|
||||
for (int i = 0; i < async_method.yields.Count; i++) {
|
||||
signature.WriteUInt32 ((uint) async_method.yields [i].Offset);
|
||||
signature.WriteUInt32 ((uint) async_method.resumes [i].Offset);
|
||||
signature.WriteCompressedUInt32 (async_method.resume_methods [i].MetadataToken.RID);
|
||||
}
|
||||
}
|
||||
|
||||
AddCustomDebugInformation (provider, async_method, signature);
|
||||
|
@ -9,7 +9,7 @@
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
using System.Diagnostics;
|
||||
using Mono.Collections.Generic;
|
||||
|
||||
namespace Mono.Cecil {
|
||||
@ -68,6 +68,7 @@ namespace Mono.Cecil {
|
||||
Collection<CustomAttributeArgument> ConstructorArguments { get; }
|
||||
}
|
||||
|
||||
[DebuggerDisplay ("{AttributeType}")]
|
||||
public sealed class CustomAttribute : ICustomAttribute {
|
||||
|
||||
internal CustomAttributeValueProjection projection;
|
||||
|
@ -276,6 +276,7 @@ namespace Mono.Cecil {
|
||||
TargetArchitecture architecture;
|
||||
ModuleAttributes attributes;
|
||||
ModuleCharacteristics characteristics;
|
||||
internal ushort linker_version = 8;
|
||||
Guid mvid;
|
||||
internal uint timestamp;
|
||||
|
||||
@ -350,7 +351,7 @@ namespace Mono.Cecil {
|
||||
set { characteristics = value; }
|
||||
}
|
||||
|
||||
[Obsolete("Use FileName")]
|
||||
[Obsolete ("Use FileName")]
|
||||
public string FullyQualifiedName {
|
||||
get { return file_name; }
|
||||
}
|
||||
@ -607,6 +608,7 @@ namespace Mono.Cecil {
|
||||
this.architecture = image.Architecture;
|
||||
this.attributes = image.Attributes;
|
||||
this.characteristics = image.Characteristics;
|
||||
this.linker_version = image.LinkerVersion;
|
||||
this.file_name = image.FileName;
|
||||
this.timestamp = image.Timestamp;
|
||||
|
||||
|
@ -38,6 +38,7 @@ namespace Mono.Cecil {
|
||||
public enum ModuleAttributes {
|
||||
ILOnly = 1,
|
||||
Required32Bit = 2,
|
||||
ILLibrary = 4,
|
||||
StrongNameSigned = 8,
|
||||
Preferred32Bit = 0x00020000,
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
using System.Diagnostics;
|
||||
using Mono.Collections.Generic;
|
||||
|
||||
namespace Mono.Cecil {
|
||||
@ -38,6 +38,7 @@ namespace Mono.Cecil {
|
||||
Collection<SecurityDeclaration> SecurityDeclarations { get; }
|
||||
}
|
||||
|
||||
[DebuggerDisplay ("{AttributeType}")]
|
||||
public sealed class SecurityAttribute : ICustomAttribute {
|
||||
|
||||
TypeReference attribute_type;
|
||||
|
Reference in New Issue
Block a user