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

Open
wzssyqa opened this issue Jun 18, 2020 · 3 comments
Open

Comments

@wzssyqa
Copy link

@wzssyqa 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
Author

@wzssyqa wzssyqa commented Jun 18, 2020

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

@wzssyqa
Copy link
Author

@wzssyqa 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 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

@gopherbot gopherbot commented Jun 21, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.