Landing: 2d570d754422

Project / Subsystem

binutils / binutils/gprofng

Date

2026-09-08

Author

"H.J. Lu" <hjl@sourceware.org>

Commit

2d570d754422b4990f590829c4bed905a327bc7b

Source

public_inbox

Perf win

No

Breaking

No

All attributes

project
binutils
subsystem
binutils/gprofng
patch_id
—
commit_hash
2d570d754422b4990f590829c4bed905a327bc7b
source_type
public_inbox
headline
Fix gprofng file offset generation for gmon.out
tldr
Correctly retrieves file offset for gmon.out map generation in gprofng.
author
"H.J. Lu" <hjl@sourceware.org>
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • profiling
  • • gprofng
  • • debugging
discussion_id_link
—
bugzilla_pr
—
date
2026-09-08T00:00:00.000Z

This change fixes a bug in gprofng’s profiling map generation where the file offset for gmon.out was not being correctly determined. Previously, a hardcoded offset of 0 was used, leading to incorrect profiling data on some platforms, specifically Linux/x86-64 as indicated by a test failure. The fix retrieves the correct file offset from the filepos field of the core_text_sect structure, ensuring accurate profiling map generation.