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

MIPS32: add .gnu.attributes and .MIPS.abiflags sections to the output object #39677

Closed
wzssyqa opened this issue Jun 18, 2020 · 5 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@wzssyqa
Copy link
Contributor

wzssyqa commented Jun 18, 2020

MIPS32 uses .gnu.attributes and .MIPS.abiflags to mark the ABI that
the object is using, and the kernel will set the correct FP mode for it.

Currrently we have no these 2 sections and thus since kernel will
treat the objects as FP32. To support FPXX and FP64 in future,
we should add support of these 2 sections.

More details about FP32/FPXX/FP64 are explained in:
    https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
@wzssyqa
Copy link
Contributor Author

wzssyqa commented Jun 18, 2020

this bug blocks #39289
MIPS32: switch to fpxx from fp32 or even fp64

@wzssyqa
Copy link
Contributor Author

wzssyqa commented Jun 18, 2020

I figure out a WIP patch:
https://github.com/wzssyqa/go/tree/add-section
RFC, and more test is needed.
Once we have more test, I will submit a CL.

wzssyqa added a commit to wzssyqa/go that referenced this issue Jun 18, 2020
MIPS32 uses .gnu.attributes and .MIPS.abiflags to mark the ABI that
the object is using, and the kernel will set the correct FP mode for it.

Currrently we have no these 2 sections and thus since kernel will
treat the objects as FP32. To support FPXX and FP64 in future,
we should add support of these 2 sections.

More details about FP32/FPXX/FP64 are explained in:
    https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

Fixes golang#39677
@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 18, 2020
@andybons andybons added this to the Unplanned milestone Jun 18, 2020
wzssyqa added a commit to wzssyqa/go that referenced this issue Jun 18, 2020
MIPS32 uses .gnu.attributes and .MIPS.abiflags to mark the ABI that
the object is using, and the kernel will set the correct FP mode for it.

Currrently we have no these 2 sections and thus since kernel will
treat the objects as FP32. To support FPXX and FP64 in future,
we should add support of these 2 sections.

More details about FP32/FPXX/FP64 are explained in:
    https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

Fixes golang#39677
wzssyqa added a commit to wzssyqa/go that referenced this issue Jun 18, 2020
MIPS32 uses .gnu.attributes and .MIPS.abiflags to mark the ABI that
the object is using, and the kernel will set the correct FP mode for it.

Currrently we have no these 2 sections and thus since kernel will
treat the objects as FP32. To support FPXX and FP64 in future,
we should add support of these 2 sections.

More details about FP32/FPXX/FP64 are explained in:
    https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

Fixes golang#39677
wzssyqa added a commit to wzssyqa/go that referenced this issue Jun 18, 2020
MIPS32 uses .gnu.attributes and .MIPS.abiflags to mark the ABI that
the object is using, and the kernel will set the correct FP mode for it.

Currrently we have no these 2 sections and thus since kernel will
treat the objects as FP32. To support FPXX and FP64 in future,
we should add support of these 2 sections.

More details about FP32/FPXX/FP64 are explained in:
    https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

Fixes golang#39677
wzssyqa added a commit to wzssyqa/go that referenced this issue Jun 18, 2020
MIPS32 uses .gnu.attributes and .MIPS.abiflags to mark the ABI that
the object is using, and the kernel will set the correct FP mode for it.

Currrently we have no these 2 sections and thus since kernel will
treat the objects as FP32. To support FPXX and FP64 in future,
we should add support of these 2 sections.

More details about FP32/FPXX/FP64 are explained in:
    https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

Fixes golang#39677
wzssyqa added a commit to wzssyqa/go that referenced this issue Jun 19, 2020
MIPS32 uses .gnu.attributes and .MIPS.abiflags to mark the ABI that
the object is using, and the kernel will set the correct FP mode for it.

Currrently we have no these 2 sections and thus since kernel will
treat the objects as FP32. To support FPXX and FP64 in future,
we should add support of these 2 sections.

More details about FP32/FPXX/FP64 are explained in:
    https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

Fixes golang#39677
wzssyqa added a commit to wzssyqa/go that referenced this issue Jun 20, 2020
MIPS32 uses .gnu.attributes and .MIPS.abiflags to mark the ABI that
the object is using, and the kernel will set the correct FP mode for it.

Currrently we have no these 2 sections and thus since kernel will
treat the objects as FP32. To support FPXX and FP64 in future,
we should add support of these 2 sections.

We add these 2 section for non-external-linker output only, since
external linker will add these 2 sections.

More details about FP32/FPXX/FP64 are explained in:
    https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

Fixes golang#39677
@gopherbot
Copy link

Change https://golang.org/cl/239217 mentions this issue: cmd/link: mips32, add .gnu.attributes and .MIPS.abiflags for internal-ld

wzssyqa added a commit to wzssyqa/go that referenced this issue Jun 21, 2020
MIPS32 uses .gnu.attributes and .MIPS.abiflags section to mark the FP ABI
the object is using, and the kernel will set the correct FP mode for it.

Currrently Go doesn't generate these 2 sections. If we link object
without these 2 sections togather FPXX objects, the result will be FPXX,
which is wrong:
   FP32 + FPXX -> FP32
   FPXX + FP64 -> FP64
   FP32 + FP64 -> reject

These 2 sections is also needed to support FPXX and FP64 in future.

More details about FP32/FPXX/FP64 are explained in:
    https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

Fixes golang#39677

Change-Id: Ia34e7461dee38a4f575dd8ace609988744512ac1
@mengzhuo
Copy link
Contributor

mengzhuo commented Nov 5, 2020

PING

@gopherbot
Copy link

Change https://golang.org/cl/323275 mentions this issue: doc/go1.17: document new debug/elf constant

@dmitshur dmitshur modified the milestones: Unplanned, Go1.17 May 28, 2021
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels May 28, 2021
gopherbot pushed a commit that referenced this issue May 28, 2021
For #39677
For #44513

Change-Id: I8c4193fd4359b83e6739e7e30a3a42b5f21b0f1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/323275
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@golang golang locked and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants