Skip to content

Commit 3136a00

Browse files
author
Cary Coutant
committed
gold/
PR gold/14993 * output.cc (Output_section::add_input_section): For incremental updates, don't track input sections that are allocated from patch space.
1 parent 07a8e9f commit 3136a00

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

gold/ChangeLog

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2013-01-07 Cary Coutant <[email protected]>
2+
3+
PR gold/14993
4+
* output.cc (Output_section::add_input_section): For incremental
5+
updates, don't track input sections that are allocated from patch
6+
space.
7+
18
2013-01-07 H.J. Lu <[email protected]>
29
Ian Lance Taylor <[email protected]>
310

gold/output.cc

+8-18
Original file line numberDiff line numberDiff line change
@@ -2422,7 +2422,7 @@ Output_section::add_input_section(Layout* layout,
24222422
input_section_size = uncompressed_size;
24232423

24242424
off_t offset_in_section;
2425-
off_t aligned_offset_in_section;
2425+
24262426
if (this->has_fixed_layout())
24272427
{
24282428
// For incremental updates, find a chunk of unused space in the section.
@@ -2432,17 +2432,15 @@ Output_section::add_input_section(Layout* layout,
24322432
gold_fallback(_("out of patch space in section %s; "
24332433
"relink with --incremental-full"),
24342434
this->name());
2435-
aligned_offset_in_section = offset_in_section;
2436-
}
2437-
else
2438-
{
2439-
offset_in_section = this->current_data_size_for_child();
2440-
aligned_offset_in_section = align_address(offset_in_section,
2441-
addralign);
2442-
this->set_current_data_size_for_child(aligned_offset_in_section
2443-
+ input_section_size);
2435+
return offset_in_section;
24442436
}
24452437

2438+
offset_in_section = this->current_data_size_for_child();
2439+
off_t aligned_offset_in_section = align_address(offset_in_section,
2440+
addralign);
2441+
this->set_current_data_size_for_child(aligned_offset_in_section
2442+
+ input_section_size);
2443+
24462444
// Determine if we want to delay code-fill generation until the output
24472445
// section is written. When the target is relaxing, we want to delay fill
24482446
// generating to avoid adjusting them during relaxation. Also, if we are
@@ -2507,14 +2505,6 @@ Output_section::add_input_section(Layout* layout,
25072505
this->set_input_section_order_specified();
25082506
}
25092507
}
2510-
if (this->has_fixed_layout())
2511-
{
2512-
// For incremental updates, finalize the address and offset now.
2513-
uint64_t addr = this->address();
2514-
isecn.set_address_and_file_offset(addr + aligned_offset_in_section,
2515-
aligned_offset_in_section,
2516-
this->offset());
2517-
}
25182508
this->input_sections_.push_back(isecn);
25192509
}
25202510

0 commit comments

Comments
 (0)