Skip to content

Commit 1b59f41

Browse files
committed
[GR-50985 Fix debug section alignment which can lead to corrupt debug info
PullRequest: graal/16404
2 parents 104d8ba + 50a8e84 commit 1b59f41

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

substratevm/src/com.oracle.objectfile/src/com/oracle/objectfile/elf/ELFObjectFile.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -1184,14 +1184,14 @@ public void installDebugInfo(DebugInfoProvider debugInfoProvider) {
11841184
DwarfRangesSectionImpl elfRangesSectionImpl = dwarfSections.getRangesSectionImpl();
11851185
DwarfLineSectionImpl elfLineSectionImpl = dwarfSections.getLineSectionImpl();
11861186
/* Now we can create the section elements with empty content. */
1187-
newUserDefinedSection(elfStrSectionImpl.getSectionName(), elfStrSectionImpl);
1188-
newUserDefinedSection(elfAbbrevSectionImpl.getSectionName(), elfAbbrevSectionImpl);
1189-
newUserDefinedSection(frameSectionImpl.getSectionName(), frameSectionImpl);
1190-
newUserDefinedSection(elfLocSectionImpl.getSectionName(), elfLocSectionImpl);
1191-
newUserDefinedSection(elfInfoSectionImpl.getSectionName(), elfInfoSectionImpl);
1192-
newUserDefinedSection(elfARangesSectionImpl.getSectionName(), elfARangesSectionImpl);
1193-
newUserDefinedSection(elfRangesSectionImpl.getSectionName(), elfRangesSectionImpl);
1194-
newUserDefinedSection(elfLineSectionImpl.getSectionName(), elfLineSectionImpl);
1187+
newDebugSection(elfStrSectionImpl.getSectionName(), elfStrSectionImpl);
1188+
newDebugSection(elfAbbrevSectionImpl.getSectionName(), elfAbbrevSectionImpl);
1189+
newDebugSection(frameSectionImpl.getSectionName(), frameSectionImpl);
1190+
newDebugSection(elfLocSectionImpl.getSectionName(), elfLocSectionImpl);
1191+
newDebugSection(elfInfoSectionImpl.getSectionName(), elfInfoSectionImpl);
1192+
newDebugSection(elfARangesSectionImpl.getSectionName(), elfARangesSectionImpl);
1193+
newDebugSection(elfRangesSectionImpl.getSectionName(), elfRangesSectionImpl);
1194+
newDebugSection(elfLineSectionImpl.getSectionName(), elfLineSectionImpl);
11951195
/*
11961196
* Add symbols for the base of all DWARF sections whose content may need to be referenced
11971197
* using a section global offset. These need to be written using a base relative reloc so

0 commit comments

Comments
 (0)