Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/link: malformed .shstrtab for toy program #62600

Closed
thanm opened this issue Sep 12, 2023 · 1 comment
Closed

cmd/link: malformed .shstrtab for toy program #62600

thanm opened this issue Sep 12, 2023 · 1 comment
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@thanm
Copy link
Contributor

thanm commented Sep 12, 2023

What version of Go are you using (go version)?

$ go version

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

linux/amd64

What did you do?

% mkdir repro
% cd repro
% go mod init repro
% echo 'package main;func main(){}' > main.go
% go build
% llvm-readelf-14 -Sl repro

What did you expect to see?

Section .shstrtab appearing only in section list, not as part of loadable segment.

What did you see instead?

 Section to Segment mapping:
  Segment Sections...
   00     
   01     .note.go.buildid 
   02     .text .note.go.buildid 
   03     .rodata .shstrtab .typelink .itablink .gosymtab .gopclntab 
   04     .go.buildinfo .noptrdata .data .bss .noptrbss 
   05     
   None   .debug_abbrev .debug_line .debug_frame .debug_gdb_scripts .debug_info .debug_loc .debug_ranges .symtab .strtab 

Note the .shstrtab in segment 03, which should not be present.

@thanm thanm added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 12, 2023
@thanm thanm added this to the Go1.22 milestone Sep 12, 2023
@thanm thanm self-assigned this Sep 12, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 12, 2023
@gopherbot
Copy link

Change https://go.dev/cl/528036 mentions this issue: cmd/link: fix malformed .shstrtab section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants