Skip to content

mips64: add missing symbols O_LARGEFILE#2738

Merged
bors merged 1 commit into
rust-lang:masterfrom
Itus-Shield:master
Apr 5, 2022
Merged

mips64: add missing symbols O_LARGEFILE#2738
bors merged 1 commit into
rust-lang:masterfrom
Itus-Shield:master

Conversation

@Grommish

@Grommish Grommish commented Apr 4, 2022

Copy link
Copy Markdown
Contributor

Add O_LARGEFILE define to src/unix/linux_like/linux/musl/b64/mips64.rs
Signed-off-by: Donald Hoskins grommish@gmail.com

Add O_LARGEFILE define to src/unix/linux_like/linux/musl/b64/mips64.rs
Signed-off-by: Donald Hoskins <grommish@gmail.com>
@rust-highfive

Copy link
Copy Markdown

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@Amanieu

Amanieu commented Apr 5, 2022

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Apr 5, 2022

Copy link
Copy Markdown
Contributor

📌 Commit 0acce72 has been approved by Amanieu

@bors

bors commented Apr 5, 2022

Copy link
Copy Markdown
Contributor

⌛ Testing commit 0acce72 with merge ce7fd91...

@bors

bors commented Apr 5, 2022

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: Amanieu
Pushing ce7fd91 to master...

@bors bors merged commit ce7fd91 into rust-lang:master Apr 5, 2022
bors added a commit that referenced this pull request Aug 15, 2022
Fix incorrect constant for O_LARGEFILE on mips64-linux-musl

Changes `O_LARGEFILE` from `0` to `0x2000`

Bash script used for ensuring constant is correct:

```sh
#!/bin/bash
echo "
#include <fcntl.h>
int largefile() {
    return O_LARGEFILE;
}
" | mips64-linux-musl-gcc -c -O2 musl_o_largefile.c -o temp.o
mips64-linux-musl-objdump -d temp.o | grep -A2 largefile
```

Output:

```asm
0000000000000000 <largefile>:
   0:	03e00008 	jr	ra
   4:	24022000 	li	v0,8192    ; 0x2000
```

Link to relevant portion of kernel source, shows that it should match mips32 musl (which currently has a value of 0x2000 as well).

I believe the reason #2738 had this value incorrect was because it's 0 for glibc on mips64 (to specify it's the default, I believe).
bors added a commit that referenced this pull request Aug 16, 2022
Fix incorrect constant for O_LARGEFILE on mips64-linux-musl

Changes `O_LARGEFILE` from `0` to `0x2000`

Bash script used for ensuring constant is correct:

```sh
#!/bin/bash
echo "
#include <fcntl.h>
int largefile() {
    return O_LARGEFILE;
}
" | mips64-linux-musl-gcc -c -O2 musl_o_largefile.c -o temp.o
mips64-linux-musl-objdump -d temp.o | grep -A2 largefile
```

Output:

```asm
0000000000000000 <largefile>:
   0:	03e00008 	jr	ra
   4:	24022000 	li	v0,8192    ; 0x2000
```

Link to relevant portion of kernel source, shows that it should match mips32 musl (which currently has a value of 0x2000 as well).

I believe the reason #2738 had this value incorrect was because it's 0 for glibc on mips64 (to specify it's the default, I believe).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants