Monday's draw at the Olympic Park also pitted top-seeded Lee Chong Wei, who lost to Lin in the Beijing Olympic final, against Ville Lang of Finland.
Third-seeded Chen Long will meet Boonsak Ponsana of Thailand, who won the Singapore Open last month, and Chinese teammate Chen Jin, who reached the world's top four in April to qualify for London, was placed in Lin's half of the draw.
Lin and Chen Jin are seeded to repeat their semifinal matchup from Beijing.
Chong Wei could have to go through Chen Long in the semifinals, although his first-round match will be tough, as Lang went three rounds in Beijing. Lang will be Chong Wei's first match since May 22, when he tore right ankle ligaments and sent a shudder through Malaysia, who regard him as their best hope for a first Olympic gold medal.
"His physical condition is better than expected. The ankle still needs support, but it is more for prevention," Malaysia team physio Sandra Fiedler said.
The injury, and Lin's rise to No. 1 in the rankings, have dampened expectations on Chong Wei, but he remained optimistic.
"There is less pressure, but it is my last Olympics so I want a medal for my country," he said at his training in Bath.
The players are split into 16 groups, with the group winners advancing to the knockout rounds.
Taufik Hidayat, the 2004 Olympic champion from Indonesia, could meet Lin the last 16 if he wins his group.
Chinese women have won the last three Olympic singles gold medals, and they're favoured again with the top three seeded players: No. 1 Wang Yihan, No. 2 Wang Xin, and No. 3 Li Xuerui, all making their Olympic debuts.
Li Xuerui, the form player on tour after a 30-match winning streak, was in Wang Xin's half of the draw.
Wang Yihan's half featured the two best non-Chinese threats for the gold, No. 4 Saina Nehwal of India and No. 5 Tine Baun of Denmark.Suggest a correction